Skip to content

Commit 528640e

Browse files
authored
Add twigcs (#51)
* twigcs * add folder
1 parent 7a96cdc commit 528640e

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.twig_cs.dist.php

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
/**
4+
* -------------------------------------------------------------------------
5+
* {NAME} plugin for GLPI
6+
* -------------------------------------------------------------------------
7+
*
8+
* MIT License
9+
*
10+
* Permission is hereby granted, free of charge, to any person obtaining a copy
11+
* of this software and associated documentation files (the "Software"), to deal
12+
* in the Software without restriction, including without limitation the rights
13+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
* copies of the Software, and to permit persons to whom the Software is
15+
* furnished to do so, subject to the following conditions:
16+
*
17+
* The above copyright notice and this permission notice shall be included in all
18+
* copies or substantial portions of the Software.
19+
*
20+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
* SOFTWARE.
27+
* -------------------------------------------------------------------------
28+
* @license MIT https://opensource.org/licenses/mit-license.php
29+
* @link https://github.com/pluginsGLPI/{LNAME}
30+
* -------------------------------------------------------------------------
31+
*/
32+
33+
declare(strict_types=1);
34+
35+
use FriendsOfTwig\Twigcs\Finder\TemplateFinder;
36+
use FriendsOfTwig\Twigcs\Config\Config;
37+
use Glpi\Tools\GlpiTwigRuleset;
38+
39+
$finder = TemplateFinder::create()
40+
->in(__DIR__ . '/templates')
41+
->name('*.html.twig')
42+
->ignoreVCSIgnored(true);
43+
44+
return Config::create()
45+
->setFinder($finder)
46+
->setRuleSet(GlpiTwigRuleset::class)
47+
;

templates/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)