Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,12 @@ permissions: write-all

jobs:
check:
if: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }}

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Checking PHP Syntax
uses: TheDragonCode/codestyler@v5
run: vendor/bin/pint --test

fix:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Checking PHP Syntax
uses: TheDragonCode/codestyler@v5
with:
github_token: ${{ secrets.COMPOSER_TOKEN }}
fix: true
File renamed without changes.
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"illuminate/collections": "^8.75 || ^9.0 || ^10.0 || ^11.0 || ^12.0"
},
"require-dev": {
"dragon-code/codestyler": "^6.0",
"fakerphp/faker": "^1.21",
"illuminate/database": "^8.75 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
"phpunit/phpunit": "^9.6 || ^10.0 || ^11.0 || ^12.0",
Expand All @@ -67,5 +68,13 @@
},
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"post-update-cmd": [
"cp vendor/dragon-code/codestyler/presets/pint/8.2.json pint.json",
"cp vendor/dragon-code/codestyler/.editorconfig .editorconfig",
"composer normalize"
],
"style": "vendor/bin/pint --parallel"
}
}
83 changes: 83 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"preset": "laravel",
"rules": {
"@PHP71Migration": true,
"@PHP73Migration": true,
"@PHP74Migration": true,
"@PHP80Migration": true,
"@PHP81Migration": true,
"@PHP82Migration": true,
"concat_space": {
"spacing": "one"
},
"blank_line_before_statement": {
"statements": [
"declare",
"phpdoc",
"continue",
"return"
]
},
"class_attributes_separation": {
"elements": {
"case": "none",
"const": "none",
"method": "one",
"property": "one",
"trait_import": "none"
}
},
"class_definition": {
"multi_line_extends_each_single_line": true,
"single_item_single_line": true,
"single_line": true,
"space_before_parenthesis": true
},
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
"braces_position": {
"allow_single_line_anonymous_functions": true,
"allow_single_line_empty_anonymous_classes": true,
"anonymous_classes_opening_brace": "same_line"
},
"escape_implicit_backslashes": {
"double_quoted": true,
"heredoc_syntax": true,
"single_quoted": false
},
"global_namespace_import": {
"import_classes": true,
"import_constants": true,
"import_functions": true
},
"multiline_comment_opening_closing": true,
"no_superfluous_elseif": true,
"no_useless_else": true,
"operator_linebreak": {
"only_booleans": false
},
"ordered_types": {
"null_adjustment": "always_last",
"sort_algorithm": "alpha"
},
"phpdoc_line_span": {
"const": "single",
"method": "multi",
"property": "single"
},
"return_assignment": true,
"simplified_if_return": true,
"phpdoc_param_order": true,
"fully_qualified_strict_types": true,
"declare_strict_types": true,
"types_spaces": {
"space_multiple_catch": "none"
},
"binary_operator_spaces": {
"default": "align_single_space_minimal"
},
"php_unit_method_casing": {
"case": "camel_case"
}
}
}
Loading