Skip to content

Commit a7f77d9

Browse files
More return type fixes (bis)
1 parent 1732d62 commit a7f77d9

9 files changed

+18
-4
lines changed

Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public function setConfigurator($configurator)
812812
/**
813813
* Gets the configurator to call after the service is fully initialized.
814814
*
815-
* @return callable|array|null
815+
* @return string|array|null
816816
*/
817817
public function getConfigurator()
818818
{

Loader/ClosureLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(ContainerBuilder $container, string $env = null)
3636
*/
3737
public function load($resource, string $type = null)
3838
{
39-
$resource($this->container, $this->env);
39+
return $resource($this->container, $this->env);
4040
}
4141

4242
/**

Loader/DirectoryLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function load($file, string $type = null)
3838
$this->import($dir, null, false, $path);
3939
}
4040
}
41+
42+
return null;
4143
}
4244

4345
/**

Loader/FileLoader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function import($resource, string $type = null, $ignoreErrors = false, st
6363
}
6464

6565
try {
66-
parent::import(...$args);
66+
return parent::import(...$args);
6767
} catch (LoaderLoadException $e) {
6868
if (!$ignoreNotFound || !($prev = $e->getPrevious()) instanceof FileLocatorFileNotFoundException) {
6969
throw $e;
@@ -79,6 +79,8 @@ public function import($resource, string $type = null, $ignoreErrors = false, st
7979
throw $e;
8080
}
8181
}
82+
83+
return null;
8284
}
8385

8486
/**

Loader/GlobFileLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function load($resource, string $type = null)
2828
}
2929

3030
$this->container->addResource($globResource);
31+
32+
return null;
3133
}
3234

3335
/**

Loader/IniFileLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public function load($resource, string $type = null)
5050
$this->container->setParameter($key, $this->phpize($value));
5151
}
5252
}
53+
54+
return null;
5355
}
5456

5557
/**

Loader/PhpFileLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public function load($resource, string $type = null)
7070
$this->instanceof = [];
7171
$this->registerAliasesForSinglyImplementedInterfaces();
7272
}
73+
74+
return null;
7375
}
7476

7577
/**

Loader/XmlFileLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function load($resource, string $type = null)
6666
}
6767
}
6868
}
69+
70+
return null;
6971
}
7072

7173
private function loadXml(\DOMDocument $xml, string $path, \DOMNode $root = null): void

Loader/YamlFileLoader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function load($resource, string $type = null)
126126

127127
// empty file
128128
if (null === $content) {
129-
return;
129+
return null;
130130
}
131131

132132
$this->loadContent($content, $path);
@@ -145,6 +145,8 @@ public function load($resource, string $type = null)
145145
$this->env = $env;
146146
}
147147
}
148+
149+
return null;
148150
}
149151

150152
private function loadContent(array $content, string $path)

0 commit comments

Comments
 (0)