Skip to content

Commit 4c01bf3

Browse files
kalessilfabpot
authored andcommitted
[2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup
1 parent 8d867ec commit 4c01bf3

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

AbstractRendererEngine.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public function setTheme(FormView $view, $themes)
6767
// Unset instead of resetting to an empty array, in order to allow
6868
// implementations (like TwigRendererEngine) to check whether $cacheKey
6969
// is set at all.
70-
unset($this->resources[$cacheKey]);
71-
unset($this->resourceHierarchyLevels[$cacheKey]);
70+
unset($this->resources[$cacheKey], $this->resourceHierarchyLevels[$cacheKey]);
7271
}
7372

7473
/**

FormBuilder.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ public function remove($name)
138138
throw new BadMethodCallException('FormBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
139139
}
140140

141-
unset($this->unresolvedChildren[$name]);
142-
unset($this->children[$name]);
141+
unset($this->unresolvedChildren[$name], $this->children[$name]);
143142

144143
return $this;
145144
}

FormRenderer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,7 @@ public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $va
279279
// Clear the caches if they were filled for the first time within
280280
// this function call
281281
if ($hierarchyInit) {
282-
unset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey]);
283-
unset($this->hierarchyLevelMap[$viewAndSuffixCacheKey]);
282+
unset($this->blockNameHierarchyMap[$viewAndSuffixCacheKey], $this->hierarchyLevelMap[$viewAndSuffixCacheKey]);
284283
}
285284

286285
if ($varInit) {

Test/FormPerformanceTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function runTest()
5454
*/
5555
public function setMaxRunningTime($maxRunningTime)
5656
{
57-
if (is_integer($maxRunningTime) && $maxRunningTime >= 0) {
57+
if (is_int($maxRunningTime) && $maxRunningTime >= 0) {
5858
$this->maxRunningTime = $maxRunningTime;
5959
} else {
6060
throw new \InvalidArgumentException();

0 commit comments

Comments
 (0)