10000 CS Fixes · symfony/symfony@ecbe24a · GitHub
[go: up one dir, main page]

Skip to content

Commit ecbe24a

Browse files
committed
CS Fixes
1 parent 898516a commit ecbe24a

File tree

3 files changed

+3
-39
lines changed

3 files changed

+3
-39
lines changed

src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function ($key, $value, $isHit) {
5353
}
5454

5555
/**
56-
* This adapter to take advantage of how PHP stores arrays in its latest versions.
56+
* This adapter takes advantage of how PHP stores arrays in its latest versions.
5757
*
5858
* @param string $file The PHP file were values are cached
5959
* @param CacheItemPoolInterface $fallbackPool Fallback when opcache is disabled

src/Symfony/Component/Cache/Simple/PhpArrayCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct($file, CacheInterface $fallbackPool)
3737
}
3838

3939
/**
40-
* This adapter to take advantage of how PHP stores arrays in its latest versions.
40+
* This adapter takes advantage of how PHP stores arrays in its latest versions.
4141
*
4242
* @param string $file The PHP file were values are cached
4343
*

src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -34,48 +34,12 @@ public function createArgumentMetadata($controller)
3434
}
3535

3636
foreach ($reflection->getParameters() as $param) {
37-
$arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param), $this->isVariadic($param), $this->hasDefaultValue($param), $this->getDefaultValue($param), $param->allowsNull());
37+
$arguments[] = new ArgumentMetadata($param->getName(), $this->getType($param), $param->isVariadic(), $param->isDefaultValueAvailable(), $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null, $param->allowsNull());
3838
}
3939

4040
return $arguments;
4141
}
4242

43-
/**
44-
* Returns whether an argument is variadic.
45-
*
46-
* @param \ReflectionParameter $parameter
47-
*
48-
* @return bool
49-
*/
50-
private function isVariadic(\ReflectionParameter $parameter)
51-
{
52-
return $parameter->isVariadic();
53-
}
54-
55-
/**
56-
* Determines whether an argument has a default value.
57-
*
58-
* @param \ReflectionParameter $parameter
59-
*
60-
* @return bool
61-
*/
62-
private function hasDefaultValue(\ReflectionParameter $parameter)
63-
{
64-
return $parameter->isDefaultValueAvailable();
65-
}
66-
67-
/**
68-
* Returns a default value if available.
69-
*
70-
* @param \ReflectionParameter $parameter
71-
*
72-
* @return mixed|null
73-
*/
74-
private function getDefaultValue(\ReflectionParameter $parameter)
75-
{
76-
return $this->hasDefaultValue($parameter) ? $parameter->getDefaultValue() : null;
77-
}
78-
7943
/**
8044
* Returns an associated type to the given parameter if available.
8145
*

0 commit comments

Comments
 (0)
0