Skip to content

Commit 954907d

Browse files
committed
Fix PhpStan
1 parent 32123e5 commit 954907d

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

src/Entity/ApiData.php

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ public function count(): int
4444
/**
4545
* Replaces or appends a item.
4646
*
47+
* @param mixed $key
48+
* @param mixed $value
4749
* @throws GitLabApiException
4850
*/
49-
public function offsetSet(mixed $key, mixed $value): void
51+
public function offsetSet($key, $value): void
5052
{
5153
if (!is_scalar($key)) { // prevents null
5254
throw new GitLabApiException('Key must be either a string or an integer, "' . gettype($key) . '" given.');
@@ -55,21 +57,34 @@ public function offsetSet(mixed $key, mixed $value): void
5557
}
5658

5759

58-
public function offsetGet(mixed $key): mixed
60+
/**
61+
* Returns a item.
62+
*
63+
* @param mixed $key
64+
*/
65+
public function offsetGet($key): mixed
5966
{
6067
return $this->$key;
6168
}
6269

6370

64-
/** Determines whether a item exists. */
65-
public function offsetExists(mixed $key): bool
71+
/**
72+
* Determines whether a item exists.
73+
*
74+
* @param mixed $key
75+
*/
76+
public function offsetExists($key): bool
6677
{
6778
return isset($this->$key);
6879
}
6980

7081

71-
/** Removes the element from this list. */
72-
public function offsetUnset(mixed $key): void
82+
/**
83+
* Removes the element from this list.
84+
*
85+
* @param mixed $key
86+
*/
87+
public function offsetUnset($key): void
7388
{
7489
unset($this->$key);
7590
}

0 commit comments

Comments
 (0)