From 85a68079844a17b908cb924c52db41062b6bb4a9 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 9 Apr 2024 07:24:22 +0200 Subject: [PATCH] add php cs fixer --- .php-cs-fixer.dist.php | 18 ++++++++++++++++++ .phpcs.xml | 24 ++++++++++++++++++++++++ assets/js/script.js | 1 + site/snippets/nav.php | 12 ++++++------ 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 .php-cs-fixer.dist.php create mode 100644 .phpcs.xml diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..6b5a6f6 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,18 @@ +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) +; diff --git a/.phpcs.xml b/.phpcs.xml new file mode 100644 index 0000000..7981259 --- /dev/null +++ b/.phpcs.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + site + site/plugins/* + site/plugins/kirby-page-block + + + + + + \ No newline at end of file diff --git a/assets/js/script.js b/assets/js/script.js index 6bd7fb5..027cf11 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -132,6 +132,7 @@ document.addEventListener("DOMContentLoaded", () => { toggleLogoState(); }, 10) ); + setWindowHeightFactor(); // Wait for fonts applied diff --git a/site/snippets/nav.php b/site/snippets/nav.php index 44d8d99..5738541 100644 --- a/site/snippets/nav.php +++ b/site/snippets/nav.php @@ -37,12 +37,12 @@ class="see-more toggle left" @click="isOpen = !isOpen">Lire children() as $article): ?> - $article - ] - ) ?> + $article + ) + ) ?>