Code Duplication    Length = 10-12 lines in 3 locations

core/services/collections/Collection.php 3 locations

@@ 120-131 (lines=12) @@
117
	  * @param mixed $identifier
118
	  * @return mixed
119
	  */
120
	 public function get( $identifier ) {
121
		 $this->rewind();
122
		 while ( $this->valid() ) {
123
			 if ( $identifier === $this->getInfo() ) {
124
				 $object = $this->current();
125
				 $this->rewind();
126
				 return $object;
127
			 }
128
			 $this->next();
129
		 }
130
		 return null;
131
	 }
132
133
134
@@ 145-155 (lines=11) @@
142
	  * @param  mixed $identifier
143
	  * @return bool
144
	  */
145
	 public function has( $identifier ) {
146
		 $this->rewind();
147
		 while ( $this->valid() ) {
148
			 if ( $identifier === $this->getInfo() ) {
149
				 $this->rewind();
150
				 return true;
151
			 }
152
			 $this->next();
153
		 }
154
		 return false;
155
	 }
156
157
158
@@ 196-205 (lines=10) @@
193
	  * @param mixed $identifier
194
	  * @return boolean
195
	  */
196
	 public function setCurrent( $identifier ) {
197
		 $this->rewind();
198
		 while ( $this->valid() ) {
199
			 if ( $identifier === $this->getInfo() ) {
200
				 return true;
201
			 }
202
			 $this->next();
203
		 }
204
		 return false;
205
	 }
206
207
208