Skip to content

Commit

Permalink
Merge pull request #101 from sergiy-petrov/php8.1-fixes
Browse files Browse the repository at this point in the history
Test against php 8.1 && fixes for php cs fixer
  • Loading branch information
brendt authored Oct 11, 2021
2 parents 609b264 + 45821f3 commit b5e0795
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 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 @@ -13,7 +13,7 @@ jobs:
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
args: --config=.php-cs-fixer.php --allow-risky=yes

- name: Extract branch name
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.0]
php: [8.0, 8.1]
dependency-version: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ composer.lock
phpunit.xml
vendor
coverage
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
8 changes: 4 additions & 4 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
->ignoreDotFiles(true)
->ignoreVCS(true);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => 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 +31,7 @@
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method', 'property',
'method' => 'one', 'property' => 'one',
],
],
'method_argument_space' => [
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require-dev": {
"larapack/dd": "^1.0",
"nesbot/carbon": "^2.40",
"phpunit/phpunit": "^8.0",
"phpunit/phpunit": "^8.5.21",
"spatie/ray": "^1.20"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/Boundaries.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private function __construct(

public static function fromString(string $startBoundary, string $endBoundary): self
{
return match("{$startBoundary}{$endBoundary}") {
return match ("{$startBoundary}{$endBoundary}") {
'[]' => self::EXCLUDE_NONE(),
'[)' => self::EXCLUDE_END(),
'(]' => self::EXCLUDE_START(),
Expand Down
2 changes: 1 addition & 1 deletion src/PeriodTraits/PeriodGetters.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function boundaries(): Boundaries

public function asString(): string
{
if (!isset($this->asString)) {
if (! isset($this->asString)) {
$this->asString = $this->resolveString();
}

Expand Down

0 comments on commit b5e0795

Please sign in to comment.