Skip to content

Commit 8b8280f

Browse files
razvbirgithub-actions[bot]
authored andcommitted
Apply PHP CS Fixer and Rector changes (CI)
1 parent 2eefab9 commit 8b8280f

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

tests/Attribute/DeprecatedTest.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,10 @@
77
use PHPUnit\Framework\TestCase;
88
use Yiisoft\Html\Attribute\Deprecated;
99

10+
use const E_USER_DEPRECATED;
11+
1012
final class DeprecatedTest extends TestCase
1113
{
12-
private function make(?string $message, ?string $since): Deprecated
13-
{
14-
$errors = [];
15-
set_error_handler(static function (int $errno, string $errstr) use (&$errors): bool {
16-
$errors[] = $errstr;
17-
return true;
18-
}, E_USER_DEPRECATED);
19-
20-
$attribute = new Deprecated($message, $since);
21-
22-
restore_error_handler();
23-
24-
return $attribute;
25-
}
26-
2714
public function testMessageProperty(): void
2815
{
2916
$attribute = $this->make('Test message', null);
@@ -95,4 +82,19 @@ public function testClassAlias(): void
9582

9683
$this->assertInstanceOf(Deprecated::class, $attribute);
9784
}
98-
}
85+
86+
private function make(?string $message, ?string $since): Deprecated
87+
{
88+
$errors = [];
89+
set_error_handler(static function (int $errno, string $errstr) use (&$errors): bool {
90+
$errors[] = $errstr;
91+
return true;
92+
}, E_USER_DEPRECATED);
93+
94+
$attribute = new Deprecated($message, $since);
95+
96+
restore_error_handler();
97+
98+
return $attribute;
99+
}
100+
}

0 commit comments

Comments
 (0)