mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 04:59:49 +09:00
Update to laravel 7
This commit is contained in:
19
vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
19
vendor/symfony/http-kernel/Bundle/Bundle.php
vendored
@@ -18,8 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
|
||||
|
||||
/**
|
||||
* An implementation of BundleInterface that adds a few conventions
|
||||
* for DependencyInjection extensions and Console commands.
|
||||
* An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
@@ -59,7 +58,7 @@ abstract class Bundle implements BundleInterface
|
||||
/**
|
||||
* Returns the bundle's container extension.
|
||||
*
|
||||
* @return ExtensionInterface|null The container extension
|
||||
* @return ExtensionInterface|null
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
@@ -70,7 +69,7 @@ abstract class Bundle implements BundleInterface
|
||||
|
||||
if (null !== $extension) {
|
||||
if (!$extension instanceof ExtensionInterface) {
|
||||
throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension)));
|
||||
throw new \LogicException(sprintf('Extension "%s" must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_debug_type($extension)));
|
||||
}
|
||||
|
||||
// check naming convention
|
||||
@@ -87,9 +86,7 @@ abstract class Bundle implements BundleInterface
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->extension) {
|
||||
return $this->extension;
|
||||
}
|
||||
return $this->extension ?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,10 +116,8 @@ abstract class Bundle implements BundleInterface
|
||||
|
||||
/**
|
||||
* Returns the bundle name (the class short name).
|
||||
*
|
||||
* @return string The Bundle name
|
||||
*/
|
||||
final public function getName()
|
||||
final public function getName(): string
|
||||
{
|
||||
if (null === $this->name) {
|
||||
$this->parseClassName();
|
||||
@@ -154,9 +149,7 @@ abstract class Bundle implements BundleInterface
|
||||
*/
|
||||
protected function createContainerExtension()
|
||||
{
|
||||
if (class_exists($class = $this->getContainerExtensionClass())) {
|
||||
return new $class();
|
||||
}
|
||||
return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null;
|
||||
}
|
||||
|
||||
private function parseClassName()
|
||||
|
||||
@@ -42,21 +42,21 @@ interface BundleInterface extends ContainerAwareInterface
|
||||
/**
|
||||
* Returns the container extension that should be implicitly loaded.
|
||||
*
|
||||
* @return ExtensionInterface|null The default extension or null if there is none
|
||||
* @return ExtensionInterface|null
|
||||
*/
|
||||
public function getContainerExtension();
|
||||
|
||||
/**
|
||||
* Returns the bundle name (the class short name).
|
||||
*
|
||||
* @return string The Bundle name
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* Gets the Bundle namespace.
|
||||
*
|
||||
* @return string The Bundle namespace
|
||||
* @return string
|
||||
*/
|
||||
public function getNamespace();
|
||||
|
||||
@@ -65,7 +65,7 @@ interface BundleInterface extends ContainerAwareInterface
|
||||
*
|
||||
* The path should always be returned as a Unix path (with /).
|
||||
*
|
||||
* @return string The Bundle absolute path
|
||||
* @return string
|
||||
*/
|
||||
public function getPath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user