mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -197,7 +197,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return in_array($offset, [
|
||||
'person', 'role', 'status', 'event',
|
||||
@@ -207,30 +207,21 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
/**
|
||||
* @param mixed $offset
|
||||
*
|
||||
* @return Event|mixed|Person|Role|Status
|
||||
* @return Event|Person|Role|Status
|
||||
*/
|
||||
public function offsetGet($offset)
|
||||
public function offsetGet($offset): mixed
|
||||
{
|
||||
switch ($offset) {
|
||||
case 'person':
|
||||
return $this->getPerson();
|
||||
|
||||
break;
|
||||
|
||||
case 'role':
|
||||
return $this->getRole();
|
||||
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
return $this->getStatus();
|
||||
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
return $this->getEvent();
|
||||
|
||||
break;
|
||||
default:
|
||||
throw new \LogicException("this offset does not exists : " . $offset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,28 +229,28 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
* @param mixed $offset
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return Participation|void
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
switch ($offset) {
|
||||
case 'person':
|
||||
return $this->setPerson($value);
|
||||
$this->setPerson($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'role':
|
||||
return $this->setRole($value);
|
||||
$this->setRole($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
return $this->setStatus($value);
|
||||
$this->setStatus($value);
|
||||
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
return $this->setEvent($value);
|
||||
$this->setEvent($value);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -268,7 +259,7 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
|
||||
/**
|
||||
* @param mixed $offset
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
$this->offsetSet($offset, null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user