Skip to content

Commit

Permalink
refactor: code style and error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Orkuncakilkaya committed Jul 26, 2024
1 parent 7e154d9 commit abb338b
Show file tree
Hide file tree
Showing 94 changed files with 10,378 additions and 11,917 deletions.
2 changes: 1 addition & 1 deletion .git_hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src
docker-compose run --rm lint
23 changes: 23 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return (new PhpCsFixer\Config())
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@PSR12' => true,
'@PhpCsFixer' => true,
'array_indentation' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'no_whitespace_before_comma_in_array' => true,
'whitespace_after_comma_in_array' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null],
],
'multiline_whitespace_before_semicolons' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
);
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@
"ext-mbstring": "*",
"guzzlehttp/guzzle": "~7.2",
"ext-zlib": "*",
"ext-openssl": "*"
"ext-openssl": "*",
"vlucas/phpdotenv": "^5.6"
},
"require-dev": {
"phpunit/phpunit": "8.5.33",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~2.19"
"phpunit/phpunit": "8.5.33"
},
"autoload": {
"psr-4": { "Fingerprint\\ServerAPI\\" : "./src" }
},
"autoload-dev": {
"psr-4": { "Fingerprint\\ServerAPI\\" : "test/" }
}
}
}
Loading

0 comments on commit abb338b

Please sign in to comment.