Skip to content

Commit

Permalink
Correct allowed/disallowed comments in test subject with attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Jul 1, 2023
1 parent 6bf2f2b commit 66e6ccb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/disallowed-allow/ClassWithAttributesAllow.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

use Waldo\Quux\Blade;

#[\Attributes\AttributeEntity] // disallowed, no $repositoryClass parameter specified
#[\Attributes\AttributeEntity] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because no $repositoryClass parameter specified
class ClassWithAttributesAllow
{

#[\Attributes\AttributeEntity(repositoryClass: \Attributes\UserRepository::class, readOnly: false)] // disallowed, $repositoryClass present with any value
#[\Attributes\AttributeEntity(repositoryClass: \Attributes\UserRepository::class, readOnly: false)] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because $repositoryClass has other value
public function hasAvocado(): bool
{
}


#[\Attributes\AttributeEntity(\Attributes\UserRepository::class)] // allowed, $repositoryClass present with any value
#[\Attributes\AttributeEntity(\Attributes\UserRepository::class)] // allowed by path in AttributeUsagesTest, disallowed in AttributeUsagesAllowParamsMultipleTest because $repositoryClass has other value
public function hasTuna(): bool
{
}


#[\Attributes\AttributeEntity(Blade::class)] // allowed, $repositoryClass present with any value
#[\Attributes\AttributeEntity(Blade::class)] // allowed in all tests, $repositoryClass present with allowed value
public function hasKetchup(): bool
{
}
Expand Down

0 comments on commit 66e6ccb

Please sign in to comment.