1 | <?php |
||
29 | class Lst implements |
||
30 | Listable, |
||
31 | Immutable, |
||
32 | Countable, |
||
33 | Arrayable, |
||
34 | Invokable |
||
35 | { |
||
36 | use IsImmutable; |
||
37 | |||
38 | private $data; |
||
39 | |||
40 | 1 | public function __construct($data) |
|
49 | |||
50 | /** |
||
51 | * To array. |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | 1 | public function toArray() |
|
59 | |||
60 | /** |
||
61 | * Invoke set. |
||
62 | * |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function __invoke() |
||
69 | |||
70 | /** |
||
71 | * Count elements of an object |
||
72 | * @link http://php.net/manual/en/countable.count.php |
||
73 | * @return int The custom count as an integer. |
||
|
|||
74 | * </p> |
||
75 | * <p> |
||
76 | * The return value is cast to an integer. |
||
77 | * @since 5.1.0 |
||
78 | */ |
||
79 | public function count() |
||
83 | |||
84 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.