Skip to content

Commit

Permalink
Merge pull request #12 from IntVent/petericebear-patch-1
Browse files Browse the repository at this point in the history
Updated psalm & cs fixer
  • Loading branch information
petericebear authored Jan 3, 2022
2 parents 3cf771c + b723e72 commit 547b094
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 32 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,21 @@ name: Check & fix styling
on: [push]

jobs:
style:
runs-on: ubuntu-latest
php-cs-fixer:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php-cs-fixer.dist.php --allow-risky=yes

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Fix styling
branch: ${{ steps.extract_branch.outputs.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coverage
.phpunit.result.cache
.php_cs.cache
.idea
/.php-cs-fixer.cache
17 changes: 11 additions & 6 deletions .php_cs → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand All @@ -26,9 +25,15 @@
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
]
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
6 changes: 4 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,10 @@ public function getSaldo(SaldoFilter $filter = null): float
}

/**
* @param SaldiFilter|null $filter
* @return float
* @param SaldiFilter|null $filter
*
* @return array
*
* @throws EboekhoudenSoapException
*/
public function getSaldi(SaldiFilter $filter = null): array
Expand Down
1 change: 0 additions & 1 deletion src/Filters/RelationFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class RelationFilter
protected string $code = '';
protected string $keyword = '';


/**
* @return int
*/
Expand Down
1 change: 0 additions & 1 deletion src/Models/EboekhoudenArticle.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public function setPriceExclVat(float $price_excl_vat): EboekhoudenArticle
return $this;
}


/**
* @return float
*/
Expand Down
3 changes: 2 additions & 1 deletion src/Models/EboekhoudenBalance.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public function getBalance(): float
}

/**
* @param string $balance
* @param float $balance
*
* @return EboekhoudenBalance
*/
public function setBalance(float $balance): EboekhoudenBalance
Expand Down

0 comments on commit 547b094

Please sign in to comment.