File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,15 @@ public function last(array $array)
143
143
}
144
144
145
145
/**
146
- * @param array $array
147
- * @param mixed $searchElement
148
- * @param integer $fromIndex
149
- * @return mixed
146
+ * Returns the first index at which a given element can be found in the array,
147
+ * or -1 if it is not present
148
+ *
149
+ * @param array $array The array
150
+ * @param mixed $searchElement The element value to find
151
+ * @param int $fromIndex Position in the array to start the search.
152
+ * @return int
150
153
*/
151
- public function indexOf (array $ array , $ searchElement , $ fromIndex = null )
154
+ public function indexOf (array $ array , $ searchElement , $ fromIndex = null ): int
152
155
{
153
156
if ($ fromIndex !== null ) {
154
157
$ array = array_slice ($ array , $ fromIndex , null , true );
You can’t perform that action at this time.
0 commit comments