add php cs fixer
This commit is contained in:
parent
76b98eb2e3
commit
85a6807984
4 changed files with 49 additions and 6 deletions
18
.php-cs-fixer.dist.php
Normal file
18
.php-cs-fixer.dist.php
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// define which files should be analyzed
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->exclude(__DIR__ . '/site/plugins')
|
||||||
|
->in(__DIR__ . '/site')
|
||||||
|
;
|
||||||
|
|
||||||
|
$config = new PhpCsFixer\Config();
|
||||||
|
return $config
|
||||||
|
->setRules(array(
|
||||||
|
'@PSR12' => true,
|
||||||
|
'array_syntax' => array('syntax' => 'long'),
|
||||||
|
'method_chaining_indentation' => true,
|
||||||
|
))
|
||||||
|
->setRiskyAllowed(true)
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
||||||
24
.phpcs.xml
Normal file
24
.phpcs.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<ruleset
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd">
|
||||||
|
|
||||||
|
<arg name="basepath" value="."/>
|
||||||
|
<arg name="cache" value=".phpcs-cache"/>
|
||||||
|
<arg name="colors"/>
|
||||||
|
<arg name="extensions" value="php"/>
|
||||||
|
<arg name="parallel" value="80"/>
|
||||||
|
|
||||||
|
<!-- Show progress -->
|
||||||
|
<arg value="p"/>
|
||||||
|
|
||||||
|
<!-- Paths to check -->
|
||||||
|
<file>site</file>
|
||||||
|
<exclude-pattern>site/plugins/*</exclude-pattern>
|
||||||
|
<file>site/plugins/kirby-page-block</file>
|
||||||
|
|
||||||
|
<!-- Include all rules from PSR-12 Coding Standard -->
|
||||||
|
<rule ref="PSR12"/>
|
||||||
|
|
||||||
|
<rule ref="Generic.Arrays.DisallowShortArraySyntax"/>
|
||||||
|
</ruleset>
|
||||||
|
|
@ -132,6 +132,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
toggleLogoState();
|
toggleLogoState();
|
||||||
}, 10)
|
}, 10)
|
||||||
);
|
);
|
||||||
|
|
||||||
setWindowHeightFactor();
|
setWindowHeightFactor();
|
||||||
|
|
||||||
// Wait for fonts applied
|
// Wait for fonts applied
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,12 @@
|
||||||
class="see-more toggle left" @click="isOpen = !isOpen">Lire</button>
|
class="see-more toggle left" @click="isOpen = !isOpen">Lire</button>
|
||||||
</div>
|
</div>
|
||||||
<?php foreach($year->children() as $article): ?>
|
<?php foreach($year->children() as $article): ?>
|
||||||
<?php snippet(
|
<?php snippet(
|
||||||
'text-item',
|
'text-item',
|
||||||
[
|
array(
|
||||||
'article' => $article
|
'article' => $article
|
||||||
]
|
)
|
||||||
) ?>
|
) ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue