1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/17176] Update implementations to be compatible with Symfony 6.3

PHPBB3-17176
This commit is contained in:
Marc Alexander
2023-08-19 13:04:25 +02:00
parent 08160b3bc3
commit cef8aaf1a4
16 changed files with 40 additions and 34 deletions

View File

@@ -56,7 +56,7 @@ class phpbb_mock_container_builder implements ContainerInterface
*
* @api
*/
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
public function get(string $id, int $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE): ?object
{
if ($this->has($id))
{
@@ -79,11 +79,11 @@ class phpbb_mock_container_builder implements ContainerInterface
*
* @param string $id The service identifier
*
* @return Boolean true if the service is defined, false otherwise
* @return bool true if the service is defined, false otherwise
*
* @api
*/
public function has($id)
public function has(string $id): bool
{
return isset($this->services[$id]);
}
@@ -99,7 +99,7 @@ class phpbb_mock_container_builder implements ContainerInterface
*
* @api
*/
public function getParameter($name)
public function getParameter(string $name): mixed
{
if ($this->hasParameter($name))
{
@@ -114,11 +114,11 @@ class phpbb_mock_container_builder implements ContainerInterface
*
* @param string $name The parameter name
*
* @return Boolean The presence of parameter in container
* @return bool The presence of parameter in container
*
* @api
*/
public function hasParameter($name)
public function hasParameter(string $name): bool
{
return isset($this->parameters[$name]);
}
@@ -202,7 +202,7 @@ class phpbb_mock_container_builder implements ContainerInterface
return false;
}
public function initialized($id)
public function initialized($id): bool
{
return true;
}