Skip to content

Commit

Permalink
Fix GitHub actions (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpoulter authored Oct 24, 2021
1 parent b32f16f commit f0adaef
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Run PHP CS Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist --allow-risky=yes
args: --config=.php_cs.dist.php --allow-risky=yes

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ coverage
.php_cs
.php_cs.cache
psalm.xml
.php-cs-fixer.cache

.idea

Expand Down
13 changes: 5 additions & 8 deletions .php_cs.dist → .php_cs.dist.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/*')
->notPath('storage/*')
->notPath('resources/view/mail/*')
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
Expand All @@ -13,14 +10,14 @@
->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 @@ -31,7 +28,7 @@
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method',
'method' => 'one',
],
],
'method_argument_space' => [
Expand Down
6 changes: 3 additions & 3 deletions tests/Examples/FlaggedEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
final class FlaggedEnum extends BaseFlaggedEnum
{
const ReadComments = 1 << 0;
public const ReadComments = 1 << 0;

const WriteComments = 1 << 1;
public const WriteComments = 1 << 1;

const EditComments = 1 << 2;
public const EditComments = 1 << 2;
}
6 changes: 3 additions & 3 deletions tests/Examples/IntegerEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*/
class IntegerEnum extends Enum
{
const Administrator = 0;
public const Administrator = 0;

const Moderator = 1;
public const Moderator = 1;

const Subscriber = 2;
public const Subscriber = 2;
}
6 changes: 3 additions & 3 deletions tests/Examples/StringEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*/
class StringEnum extends Enum
{
const Administrator = 'administrator';
public const Administrator = 'administrator';

const Moderator = 'moderator';
public const Moderator = 'moderator';

const Subscriber = 'subscriber';
public const Subscriber = 'subscriber';
}

0 comments on commit f0adaef

Please sign in to comment.