Skip to content

Commit 18032c8

Browse files
committed
Ignore phpcs error for inline control structure
1 parent b7e0b52 commit 18032c8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

benchmark/BSON/DocumentBench.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,21 @@ public function benchToPHPArray(): void
5757
public function benchIteration(): void
5858
{
5959
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
60+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
6061
foreach (self::$document as $key => $value);
6162
}
6263

6364
public function benchIterationAsArray(): void
6465
{
6566
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
67+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
6668
foreach (self::$document->toPHP(['root' => 'array']) as $key => $value);
6769
}
6870

6971
public function benchIterationAsObject(): void
7072
{
7173
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
74+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
7275
foreach (self::$document->toPHP() as $key => $value);
7376
}
7477
}

benchmark/BSON/PackedArrayBench.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,21 @@ public function benchToPHPArray(): void
5858
public function benchIteration(): void
5959
{
6060
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
61+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
6162
foreach (self::$array as $key => $value);
6263
}
6364

6465
public function benchIterationAfterIteratorToArray(): void
6566
{
6667
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
68+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
6769
foreach (iterator_to_array(self::$array) as $key => $value);
6870
}
6971

7072
public function benchIterationAsArray(): void
7173
{
7274
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedForeach
75+
// phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
7376
foreach (self::$array->toPHP() as $key => $value);
7477
}
7578
}

0 commit comments

Comments
 (0)