reinstall dependencies on php 7.4

This commit is contained in:
Attila Jozsef Kerekes
2022-11-14 21:15:40 +01:00
parent 8972a11c0a
commit 98401f20a2
681 changed files with 65697 additions and 9274 deletions

View File

@@ -34,7 +34,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
* @param mixed $subject The subject of the event, usually an object or a callable
* @param array $arguments Arguments to store in the event
*/
public function __construct(mixed $subject = null, array $arguments = [])
public function __construct($subject = null, array $arguments = [])
{
$this->subject = $subject;
$this->arguments = $arguments;
@@ -42,8 +42,10 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Getter for subject property.
*
* @return mixed
*/
public function getSubject(): mixed
public function getSubject()
{
return $this->subject;
}
@@ -51,9 +53,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Get argument by key.
*
* @return mixed
*
* @throws \InvalidArgumentException if key is not found
*/
public function getArgument(string $key): mixed
public function getArgument(string $key)
{
if ($this->hasArgument($key)) {
return $this->arguments[$key];
@@ -65,9 +69,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Add argument to event.
*
* @param mixed $value Value
*
* @return $this
*/
public function setArgument(string $key, mixed $value): static
public function setArgument(string $key, $value)
{
$this->arguments[$key] = $value;
@@ -76,8 +82,10 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Getter for all arguments.
*
* @return array
*/
public function getArguments(): array
public function getArguments()
{
return $this->arguments;
}
@@ -87,7 +95,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
*
* @return $this
*/
public function setArguments(array $args = []): static
public function setArguments(array $args = [])
{
$this->arguments = $args;
@@ -96,8 +104,10 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* Has argument.
*
* @return bool
*/
public function hasArgument(string $key): bool
public function hasArgument(string $key)
{
return \array_key_exists($key, $this->arguments);
}
@@ -107,9 +117,12 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
*
* @param string $key Array key
*
* @return mixed
*
* @throws \InvalidArgumentException if key does not exist in $this->args
*/
public function offsetGet(mixed $key): mixed
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->getArgument($key);
}
@@ -117,9 +130,13 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
/**
* ArrayAccess for argument setter.
*
* @param string $key Array key to set
* @param string $key Array key to set
* @param mixed $value Value
*
* @return void
*/
public function offsetSet(mixed $key, mixed $value): void
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
$this->setArgument($key, $value);
}
@@ -128,8 +145,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
* ArrayAccess for unset argument.
*
* @param string $key Array key
*
* @return void
*/
public function offsetUnset(mixed $key): void
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
if ($this->hasArgument($key)) {
unset($this->arguments[$key]);
@@ -140,8 +160,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
* ArrayAccess has argument.
*
* @param string $key Array key
*
* @return bool
*/
public function offsetExists(mixed $key): bool
#[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->hasArgument($key);
}
@@ -151,7 +174,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
*
* @return \ArrayIterator<string, mixed>
*/
public function getIterator(): \ArrayIterator
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->arguments);
}