@@ -17,53 +17,52 @@ interface ListInterface extends \Iterator, \JsonSerializable, \Countable
1717 *
1818 * @return mixed
1919 */
20- public function first ();
20+ public function first (): mixed ;
2121
2222 /**
2323 * Get the last value of list
2424 *
2525 * @return mixed
2626 */
27- public function last ();
27+ public function last (): mixed ;
2828
2929 /**
30- * Get a value by it's key
30+ * Get a value by its key
3131 *
32- * @param $key Key to verify on list.
32+ * @param integer|string $key key to verify on list.
3333 * @return mixed
3434 */
35- public function get ($ key );
35+ public function get (int | string $ key ): mixed ;
3636
3737 /**
3838 * Add a value to list
3939 *
4040 * @param mixed $value Value to add.
4141 */
42- public function push ($ value ): void ;
42+ public function push (mixed $ value ): void ;
4343
4444 /**
45- * Put a object into list on given key
45+ * Put an object into list on given key
4646 *
47- * @param string| integer $key KeyType for manage the value.
47+ * @param integer|string $key KeyType for manage the value.
4848 * @param mixed $value Value to add.
4949 */
50- public function put ($ key , $ value ): void ;
50+ public function put (int | string $ key , mixed $ value ): void ;
5151
5252 /**
5353 * Check if a given key exists on list
5454 *
55- * @param $key Key to verify on list.
55+ * @param integer|string $key Key to verify on list.
5656 * @return bool True if key exists, false otherwise.
5757 */
58- public function has ($ key ): bool ;
58+ public function has (int | string $ key ): bool ;
5959
6060 /**
61- * Remove a value by it's key on list
61+ * Remove a value by its key on list
6262 *
63- * @param $key Key to remove from list.
64- * @return mixed
63+ * @param integer|string $key key to remove from list.
6564 */
66- public function remove ($ key );
65+ public function remove (int | string $ key ): void ;
6766
6867 /**
6968 * Return an array representation for list
0 commit comments