Skip to content

Commit

Permalink
Use typed properties in tests as much as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 25, 2023
1 parent ef5e38a commit b307cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Tests/ExpressionLanguageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ public function testParseThrowsInsteadOfNotice()

public static function shortCircuitProviderEvaluate()
{
$object = new class(\Closure::fromCallable([static::class, 'fail'])) {
private $fail;
$object = new class(static::fail(...)) {
private \Closure $fail;

public function __construct(callable $fail)
public function __construct(\Closure $fail)
{
$this->fail = $fail;
}
Expand Down
5 changes: 1 addition & 4 deletions Tests/LexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@

class LexerTest extends TestCase
{
/**
* @var Lexer
*/
private $lexer;
private Lexer $lexer;

protected function setUp(): void
{
Expand Down

0 comments on commit b307cb5

Please sign in to comment.