Removed dead code in Kernel
This commit is contained in:
parent
f0168e3ed6
commit
91d72a67c8
|
@ -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