Commit 747f3465 authored by Jacob Priddy's avatar Jacob Priddy 👌

add php code styles

parent d5ed4b6a
......@@ -24,6 +24,12 @@ build_web_backend:
# Currently set to build timeout
expire_in: 1 hour
test_php_styles:
stage: test
script:
- cd src/web/backend
- vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --stop-on-violation --using-cache=no
test_web_backend_unit:
stage: test
script:
......
<?php
$finder = PhpCsFixer\Finder::create()
->in(realpath(__DIR__ . '/app'))
->in(realpath(__DIR__ . '/src'))
->in(realpath(__DIR__ . '/config'))
->in(realpath(__DIR__ . '/database'))
->in(realpath(__DIR__ . '/routes'))
->in(realpath(__DIR__ . '/tests'));
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'no_unused_imports' => true,
'ordered_imports' => [
'sortAlgorithm' => 'length'
]
])
->setUsingCache(true)
->setFinder($finder);
<?php
namespace App;
class Group {
}
......@@ -10,6 +10,7 @@
"require": {
"php": "^7.4",
"fideloper/proxy": "^4.0",
"friendsofphp/php-cs-fixer": "^2.16",
"laravel/framework": "^6.2",
"laravel/tinker": "^2.0"
},
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment