Skip to content

Commit 4fcfbd5

Browse files
Backport type fixes
1 parent 88a3e17 commit 4fcfbd5

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

Argument/ServiceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(\Closure $factory, array $serviceMap, array $service
3737
*
3838
* @return mixed
3939
*/
40-
public function get($id)
40+
public function get(string $id)
4141
{
4242
return isset($this->serviceMap[$id]) ? ($this->factory)(...$this->serviceMap[$id]) : parent::get($id);
4343
}

ContainerInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public function set(string $id, ?object $service);
5151
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
5252

5353
/**
54-
* @param string $id The service identifier
55-
*
5654
* @return bool true if the service is defined, false otherwise
5755
*/
5856
public function has(string $id);

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function load($resource, string $type = null)
148148
}
149149
}
150150

151-
private function loadContent($content, $path)
151+
private function loadContent(array $content, string $path)
152152
{
153153
// imports
154154
$this->parseImports($content, $path);

ParameterBag/ContainerBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function all()
3838
*
3939
* @return mixed
4040
*/
41-
public function get($name)
41+
public function get(string $name)
4242
{
4343
return $this->container->getParameter($name);
4444
}
@@ -48,7 +48,7 @@ public function get($name)
4848
*
4949
* @return bool
5050
*/
51-
public function has($name)
51+
public function has(string $name)
5252
{
5353
return $this->container->hasParameter($name);
5454
}

ServiceLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ServiceLocator implements ServiceProviderInterface
3838
*
3939
* @return mixed
4040
*/
41-
public function get($id)
41+
public function get(string $id)
4242
{
4343
if (!$this->externalId) {
4444
return $this->doGet($id);

0 commit comments

Comments
 (0)