Skip to content

Commit

Permalink
Multiline attributes only supported on PHP 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols authored and stronk7 committed Mar 23, 2024
1 parent 74421e1 commit e39842c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ public static function docblockCorrectnessProvider(): array {
'errors' => [],
'warnings' => [],
],
'Docblock with attributes on function (correct)' => [
'fixture' => 'docblock_with_multiline_attributes',
'fixtureFilename' => null,
'errors' => [],
'warnings' => [],
],
'Testcase' => [
'fixture' => 'testcase_class',
'fixtureFilename' => '/lib/tests/example_test.php',
Expand All @@ -148,6 +142,16 @@ public static function docblockCorrectnessProvider(): array {
],
];

if (version_compare(PHP_VERSION, '8.0.0') >= 0) {
$cases['Multiline attributes'] = [
'fixture' => 'docblock_with_multiline_attributes',
'fixtureFilename' => null,
'errors' => [
],
'warnings' => [],
];
}

if (version_compare(PHP_VERSION, '8.1.0') >= 0) {
$cases['Enum only (correct)'] = [
'fixture' => 'enum_only',
Expand Down

0 comments on commit e39842c

Please sign in to comment.