diff --git a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php index 30cbe0ebaf..a5b4e5ad24 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/ClosureLoader.php @@ -36,23 +36,15 @@ class ClosureLoader extends Loader } /** - * Loads a Closure. - * - * @param \Closure $closure The resource - * @param string $type The resource type + * {@inheritdoc} */ - public function load($closure, $type = null) + public function load($resource, $type = null) { - call_user_func($closure, $this->container); + call_user_func($resource, $this->container); } /** - * Returns true if this class supports the given resource. - * - * @param mixed $resource A resource - * @param string $type The resource type - * - * @return bool true if this class supports the given resource, false otherwise + * {@inheritdoc} */ public function supports($resource, $type = null) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php index ad437b5138..d71eecf741 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/FileLoader.php @@ -27,8 +27,8 @@ abstract class FileLoader extends BaseFileLoader /** * Constructor. * - * @param ContainerBuilder $container A ContainerBuilder instance - * @param FileLocatorInterface $locator A FileLocator instance + * @param ContainerBuilder $container A ContainerBuilder instance + * @param FileLocatorInterface $locator A FileLocator instance */ public function __construct(ContainerBuilder $container, FileLocatorInterface $locator) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php index 189eaa5fde..16ddf87f85 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/IniFileLoader.php @@ -22,22 +22,17 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; class IniFileLoader extends FileLoader { /** - * Loads a resource. - * - * @param mixed $file The resource - * @param string $type The resource type - * - * @throws InvalidArgumentException When ini file is not valid + * {@inheritdoc} */ - public function load($file, $type = null) + public function load($resource, $type = null) { - $path = $this->locator->locate($file); + $path = $this->locator->locate($resource); $this->container->addResource(new FileResource($path)); $result = parse_ini_file($path, true); if (false === $result || array() === $result) { - throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $file)); + throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource)); } if (isset($result['parameters']) && is_array($result['parameters'])) { @@ -48,12 +43,7 @@ class IniFileLoader extends FileLoader } /** - * Returns true if this class supports the given resource. - * - * @param mixed $resource A resource - * @param string $type The resource type - * - * @return bool true if this class supports the given resource, false otherwise + * {@inheritdoc} */ public function supports($resource, $type = null) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php index f3139ad70a..08c1d9af4f 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php @@ -24,18 +24,15 @@ use Symfony\Component\Config\Resource\FileResource; class PhpFileLoader extends FileLoader { /** - * Loads a PHP file. - * - * @param mixed $file The resource - * @param string $type The resource type + * {@inheritdoc} */ - public function load($file, $type = null) + public function load($resource, $type = null) { // the container and loader variables are exposed to the included file below $container = $this->container; $loader = $this; - $path = $this->locator->locate($file); + $path = $this->locator->locate($resource); $this->setCurrentDir(dirname($path)); $this->container->addResource(new FileResource($path)); @@ -43,12 +40,7 @@ class PhpFileLoader extends FileLoader } /** - * Returns true if this class supports the given resource. - * - * @param mixed $resource A resource - * @param string $type The resource type - * - * @return bool true if this class supports the given resource, false otherwise + * {@inheritdoc} */ public function supports($resource, $type = null) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 4147a403cd..24104fd2cc 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -30,14 +30,11 @@ use Symfony\Component\DependencyInjection\Exception\RuntimeException; class XmlFileLoader extends FileLoader { /** - * Loads an XML file. - * - * @param mixed $file The resource - * @param string $type The resource type + * {@inheritdoc} */ - public function load($file, $type = null) + public function load($resource, $type = null) { - $path = $this->locator->locate($file); + $path = $this->locator->locate($resource); $xml = $this->parseFile($path); $xml->registerXPathNamespace('container', 'http://symfony.com/schema/dic/services'); @@ -61,12 +58,7 @@ class XmlFileLoader extends FileLoader } /** - * Returns true if this class supports the given resource. - * - * @param mixed $resource A resource - * @param string $type The resource type - * - * @return bool true if this class supports the given resource, false otherwise + * {@inheritdoc} */ public function supports($resource, $type = null) { diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 8fee1bfefa..a96cc39c06 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -32,14 +32,11 @@ class YamlFileLoader extends FileLoader private $yamlParser; /** - * Loads a Yaml file. - * - * @param mixed $file The resource - * @param string $type The resource type + * {@inheritdoc} */ - public function load($file, $type = null) + public function load($resource, $type = null) { - $path = $this->locator->locate($file); + $path = $this->locator->locate($resource); $content = $this->loadFile($path); @@ -56,7 +53,7 @@ class YamlFileLoader extends FileLoader // parameters if (isset($content['parameters'])) { if (!is_array($content['parameters'])) { - throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in %s. Check your YAML syntax.', $file)); + throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in %s. Check your YAML syntax.', $resource)); } foreach ($content['parameters'] as $key => $value) { @@ -68,16 +65,11 @@ class YamlFileLoader extends FileLoader $this->loadFromExtensions($content); // services - $this->parseDefinitions($content, $file); + $this->parseDefinitions($content, $resource); } /** - * Returns true if this class supports the given resource. - * - * @param mixed $resource A resource - * @param string $type The resource type - * - * @return bool true if this class supports the given resource, false otherwise + * {@inheritdoc} */ public function supports($resource, $type = null) {