Skip to content

Commit e6085f0

Browse files
authored
[Coding Style] Enable rule Generic.ControlStructures.InlineControlStructure.NotAllowed (#22114)
* [Coding Style] Enable rule Generic.ControlStructures.InlineControlStructure.NotAllowed * Apply CS
1 parent 024a24e commit e6085f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/SiteContentDetector.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,10 @@ private function saveToCache(string $cacheKey, int $cacheLife): void
306306
if (!isset($cacheData['detectedContent'][$type])) {
307307
$cacheData['detectedContent'][$type] = [];
308308
}
309-
foreach ($detections as $detectionId => $wasDetected)
310-
if (null !== $wasDetected) {
311-
$cacheData['detectedContent'][$type][$detectionId] = $wasDetected;
309+
foreach ($detections as $detectionId => $wasDetected) {
310+
if (null !== $wasDetected) {
311+
$cacheData['detectedContent'][$type][$detectionId] = $wasDetected;
312+
}
312313
}
313314
}
314315

phpcs.xml

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<!-- can't use this as long as we have functions.php files that need to be required manually -->
2828
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
2929

30-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
3130
<exclude name="Generic.Files.LineLength" />
3231
<exclude name="Generic.PHP.LowerCaseConstant.Found" />
3332
<exclude name="PSR12.Files.FileHeader" />

0 commit comments

Comments
 (0)