minor #28219 Removed dead code in Kernel (kevin-biig)
This PR was merged into the 4.2-dev branch.
Discussion
----------
Removed dead code in Kernel
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
While navigating in `src/Symfony/Component/HttpKernel/Kernel` I saw some **dead** codes.
Commits
-------
91d72a67c8
Removed dead code in Kernel
This commit is contained in:
commit
662548f553
|
@ -244,19 +244,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
||||||
|
|
||||||
$isResource = 0 === strpos($path, 'Resources') && null !== $dir;
|
$isResource = 0 === strpos($path, 'Resources') && null !== $dir;
|
||||||
$overridePath = substr($path, 9);
|
$overridePath = substr($path, 9);
|
||||||
$resourceBundle = null;
|
|
||||||
$bundle = $this->getBundle($bundleName);
|
$bundle = $this->getBundle($bundleName);
|
||||||
$files = array();
|
$files = array();
|
||||||
|
|
||||||
if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
|
if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) {
|
||||||
if (null !== $resourceBundle) {
|
|
||||||
throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.',
|
|
||||||
$file,
|
|
||||||
$resourceBundle,
|
|
||||||
$dir.'/'.$bundle->getName().$overridePath
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
$files[] = $file;
|
$files[] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,7 +256,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
$files[] = $file;
|
$files[] = $file;
|
||||||
$resourceBundle = $bundle->getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\count($files) > 0) {
|
if (\count($files) > 0) {
|
||||||
|
|
Reference in New Issue