mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
migration symfony 5 4 (#300)
* symfony 5.4 (diff dev) * symfony 5.4 (working) * symfony 5.4 (update autoload) * symfony 5.4 (remove swiftmailer mailer implementation) * symfony 5.4 (php doc and split Global accessor class) ### Impacted packages: composer require php:">=7.2.5 <8.0.0" symfony/console:5.4.* symfony/dotenv:5.4.* symfony/framework-bundle:5.4.* symfony/twig-bundle:5.4.* symfony/yaml:5.4.* --update-with-dependencies composer require symfony/stopwatch:5.4.* symfony/web-profiler-bundle:5.4.* --dev --update-with-dependencies
This commit is contained in:
@@ -50,14 +50,11 @@ class Scope
|
||||
/**
|
||||
* Stores data into current scope.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function set($key, $value)
|
||||
public function set(string $key, $value)
|
||||
{
|
||||
if ($this->left) {
|
||||
throw new \LogicException('Left scope is not mutable.');
|
||||
@@ -71,11 +68,9 @@ class Scope
|
||||
/**
|
||||
* Tests if a data is visible from current scope.
|
||||
*
|
||||
* @param string $key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function has($key)
|
||||
public function has(string $key)
|
||||
{
|
||||
if (\array_key_exists($key, $this->data)) {
|
||||
return true;
|
||||
@@ -91,12 +86,9 @@ class Scope
|
||||
/**
|
||||
* Returns data visible from current scope.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($key, $default = null)
|
||||
public function get(string $key, $default = null)
|
||||
{
|
||||
if (\array_key_exists($key, $this->data)) {
|
||||
return $this->data[$key];
|
||||
|
||||
Reference in New Issue
Block a user