File tree 2 files changed +2
-6
lines changed
tests/PHPStan/Ast/Attributes
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,15 @@ public function hasAttribute(string $key): bool
23
23
}
24
24
25
25
/**
26
- * @param mixed|null $default
27
26
* @return mixed|null
28
27
*/
29
- public function getAttribute (string $ key, $ default = null )
28
+ public function getAttribute (string $ key )
30
29
{
31
30
if ($ this ->hasAttribute ($ key )) {
32
31
return $ this ->attributes [$ key ];
33
32
}
34
33
35
- return $ default ;
34
+ return null ;
36
35
}
37
36
38
37
}
Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ protected function setUp(): void
30
30
31
31
public function testGetAttribute (): void
32
32
{
33
- $ defaultValue = $ this ->phpDocNode ->getAttribute ('unknown_with_default ' , 100 );
34
- $ this ->assertSame (100 , $ defaultValue );
35
-
36
33
$ unKnownValue = $ this ->phpDocNode ->getAttribute ('unknown ' );
37
34
$ this ->assertNull ($ unKnownValue );
38
35
}
You can’t perform that action at this time.
0 commit comments