@@ -73,30 +73,30 @@ composer req --dev wayofdev/cs-fixer-config
7373
7474 ``` php
7575 <?php
76-
76+
7777 declare(strict_types=1);
78-
78+
7979 use WayOfDev\PhpCsFixer\Config\ConfigBuilder;
8080 use WayOfDev\PhpCsFixer\Config\RuleSets\DefaultSet;
81-
81+
8282 require_once 'vendor/autoload.php';
83-
83+
8484 $config = ConfigBuilder::createFromRuleSet(new DefaultSet())
8585 ->inDir(__DIR__ . '/src')
8686 ->inDir(__DIR__ . '/tests')
8787 ->addFiles([__FILE__])
8888 ->getConfig()
8989 ;
90-
90+
9191 $config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php-cs-fixer.cache');
92-
92+
9393 return $config;
9494 ```
9595
9696### → Composer Script
9797
9898* Add ` scripts ` section to ` composer.json ` :
99-
99+
100100 ``` diff
101101 {
102102 "scripts": {
@@ -126,11 +126,11 @@ composer req --dev wayofdev/cs-fixer-config
126126 +prepare:
127127 + mkdir -p .build/php-cs-fixer
128128 +.PHONY: prepare
129-
129+
130130 +lint-php: prepare ## Fixes code to follow coding standards using php-cs-fixer
131131 + $(APP_COMPOSER) cs:fix
132132 +.PHONY: lint-php
133-
133+
134134 +lint-diff: prepare ## Runs php-cs-fixer in dry-run mode and shows diff which will by applied
135135 + $(APP_COMPOSER) cs:diff
136136 +.PHONY: lint-diff
@@ -148,17 +148,17 @@ composer req --dev wayofdev/cs-fixer-config
148148
149149 ``` yaml
150150 ---
151-
151+
152152 on : # yamllint disable-line rule:truthy
153153 pull_request :
154154 branches :
155155 - master
156156 push :
157157 branches :
158158 - master
159-
159+
160160 name : 🧹 Fix PHP coding standards
161-
161+
162162 jobs :
163163 coding-standards :
164164 timeout-minutes : 4
@@ -181,48 +181,48 @@ composer req --dev wayofdev/cs-fixer-config
181181 run : |
182182 git config --global core.autocrlf false
183183 git config --global core.eol lf
184-
184+
185185 - name : 🛠️ Setup PHP
186186 uses : shivammathur/setup-php@2.30.4
187187 with :
188188 php-version : ${{ matrix.php-version }}
189189 extensions : none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter
190190 ini-values : error_reporting=E_ALL
191191 coverage : none
192-
192+
193193 - name : 📦 Check out the codebase
194194 uses : actions/checkout@v4.1.5
195-
195+
196196 - name : 🛠️ Setup problem matchers
197197 run : |
198198 echo "::add-matcher::${{ runner.tool_cache }}/php.json"
199-
199+
200200 - name : 🤖 Validate composer.json and composer.lock
201201 run : composer validate --ansi --strict
202-
202+
203203 - name : 🔍 Get composer cache directory
204204 uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
205-
205+
206206 - name : ♻️ Restore cached dependencies installed with composer
207207 uses : actions/cache@v4.0.2
208208 with :
209209 path : ${{ env.COMPOSER_CACHE_DIR }}
210210 key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
211211 restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
212-
212+
213213 - name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
214214 uses : wayofdev/gh-actions/actions/composer/install@v3.1.0
215215 with :
216216 dependencies : ${{ matrix.dependencies }}
217-
217+
218218 - name : 🛠️ Prepare environment
219219 run : make prepare
220-
220+
221221 - name : 🚨 Run coding standards task
222222 run : composer cs:fix
223223 env :
224224 PHP_CS_FIXER_IGNORE_ENV : true
225-
225+
226226 - name : 📤 Commit and push changed files back to GitHub
227227 uses : stefanzweifel/git-auto-commit-action@v5.0.1
228228 with :
@@ -278,7 +278,7 @@ To use via composer script commands:
278278* Runs php-cs-fixer in dry-run mode and shows diff which will by applied:
279279
280280 ``` bash
281- make lint-diff
281+ make lint-diff
282282 ```
283283
284284<br >
@@ -320,7 +320,7 @@ You are more than welcome. Before contributing, kindly check our [contribution g
320320* ** Discord:** Join our community on [ Discord] ( https://discord.gg/CE3TcCC5vr ) .
321321
322322<p align =" left " >
323- <a href="https://discord.gg/CE3TcCC5vr" target="_blank"><img alt="Codecov " src="https://img.shields.io/discord/1228506758562058391?style=for-the-badge&logo=discord&labelColor=7289d9&logoColor=white&color=39456d"></a>
323+ <a href="https://discord.gg/CE3TcCC5vr" target="_blank"><img alt="Discord Link " src="https://img.shields.io/discord/1228506758562058391?style=for-the-badge&logo=discord&labelColor=7289d9&logoColor=white&color=39456d"></a>
324324 <a href="https://x.com/intent/follow?screen_name=wayofdev" target="_blank"><img alt="Follow on Twitter (X)" src="https://img.shields.io/badge/-Follow-black?style=for-the-badge&logo=X"></a>
325325</p >
326326
0 commit comments