Skip to content

Commit

Permalink
Update StyleCI config (#80)
Browse files Browse the repository at this point in the history
* Update StyleCI config

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
  • Loading branch information
vjik and StyleCIBot committed Mar 31, 2023
1 parent d714e3b commit 074a210
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
18 changes: 7 additions & 11 deletions .styleci.yml
@@ -1,21 +1,12 @@
preset: psr12
risky: true

version: 8
version: 8.1

finder:
exclude:
- docs
- vendor
- resources
- views
- public
- templates
- tests/Common/Support
not-name:
- UnionCar.php
- TimerUnionTypes.php
- schema1.php

enabled:
- alpha_ordered_traits
Expand Down Expand Up @@ -65,7 +56,6 @@ enabled:
- phpdoc_order
- phpdoc_property
- phpdoc_scalar
- phpdoc_separation
- phpdoc_singular_inheritdoc
- phpdoc_trim
- phpdoc_trim_consecutive_blank_line_separation
Expand All @@ -87,3 +77,9 @@ enabled:
- trailing_comma_in_multiline_array
- unalign_double_arrow
- unalign_equals
- empty_loop_body_braces
- integer_literal_case
- union_type_without_spaces

disabled:
- function_declaration
2 changes: 1 addition & 1 deletion tests/Common/Support/CallStaticWithStaticObject.php
Expand Up @@ -13,7 +13,7 @@ final class CallStaticWithStaticObject
public static function __callStatic(string $name, array $args): string
{
if ($name === 'foo') {
static::$wasCalled = true;
self::$wasCalled = true;
return 'bar';
}
throw new Exception('Unknown method.');
Expand Down
2 changes: 1 addition & 1 deletion tests/Common/Support/StaticWithStaticObject.php
Expand Up @@ -10,7 +10,7 @@ final class StaticWithStaticObject

public static function foo(): string
{
static::$wasCalled = true;
self::$wasCalled = true;
return 'bar';
}
}
2 changes: 2 additions & 0 deletions tests/Php8/Support/TimerUnionTypes.php
Expand Up @@ -9,10 +9,12 @@
class TimerUnionTypes
{
private string|DateTimeInterface $time;

public function __construct(string|DateTimeInterface $time)
{
$this->time = $time;
}

public function getTime(): string|DateTimeInterface
{
return $this->time;
Expand Down

0 comments on commit 074a210

Please sign in to comment.