@@ -52,6 +52,9 @@ discard block |
||
52 | 52 | return current($this->objects); |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $key |
|
57 | + */ |
|
55 | 58 | public function remove($key) |
56 | 59 | { |
57 | 60 | if (!isset($this->objects[$key]) && !array_key_exists($key, $this->objects)) { |
@@ -82,6 +85,9 @@ discard block |
||
82 | 85 | return in_array($element, $this->objects, true); |
83 | 86 | } |
84 | 87 | |
88 | + /** |
|
89 | + * @param integer $key |
|
90 | + */ |
|
85 | 91 | public function get($key) |
86 | 92 | { |
87 | 93 | return $this->objects[$key] ?? null; |
@@ -102,11 +108,18 @@ discard block |
||
102 | 108 | return count($this->objects); |
103 | 109 | } |
104 | 110 | |
111 | + /** |
|
112 | + * @param integer $key |
|
113 | + * @param \PhpValueObjects\Tests\Collection\ObjectForTest $value |
|
114 | + */ |
|
105 | 115 | public function set($key, $value): void |
106 | 116 | { |
107 | 117 | $this->objects[$key] = $value; |
108 | 118 | } |
109 | 119 | |
120 | + /** |
|
121 | + * @param \PhpValueObjects\Tests\Collection\ObjectForTest $element |
|
122 | + */ |
|
110 | 123 | public function add($element): void |
111 | 124 | { |
112 | 125 | $this->objects[] = $element; |