1 | <?php |
||
12 | class CollectionStringy extends \Arrayy\Collection\Collection |
||
13 | { |
||
14 | /** |
||
15 | * Creates an CollectionInterface object. |
||
16 | * |
||
17 | * @param mixed $data |
||
18 | * @param string $iteratorClass |
||
19 | * @param bool $checkPropertiesInConstructor |
||
20 | * |
||
21 | * @return static |
||
22 | * <p>(Immutable) Returns an new instance of the CollectionInterface object.</p> |
||
23 | * |
||
24 | * @template TKeyCreate as array-key |
||
25 | * @template TCreate of Stringy |
||
26 | * |
||
27 | * @phpstan-param array<TKeyCreate,TCreate> $data |
||
28 | * @phpstan-param class-string<\Arrayy\ArrayyIterator<array-key, mixed>> $iteratorClass |
||
29 | * @phpstan-return static<TKeyCreate,TCreate> |
||
30 | * |
||
31 | * @psalm-mutation-free |
||
32 | */ |
||
33 | 79 | public static function create( |
|
44 | |||
45 | 83 | public function getType(): string |
|
49 | |||
50 | /** |
||
51 | * @return Stringy[] |
||
52 | * |
||
53 | * @phpstan-return array<array-key,Stringy> |
||
54 | */ |
||
55 | public function getAll(): array |
||
59 | |||
60 | /** |
||
61 | * @return \Generator|Stringy[] |
||
62 | * |
||
63 | * @phpstan-return \Generator<mixed,Stringy>|\Generator<TKey,T> |
||
64 | * @psalm-mutation-free |
||
65 | */ |
||
66 | 82 | public function getGenerator(): \Generator |
|
70 | |||
71 | /** |
||
72 | * @return string[] |
||
73 | */ |
||
74 | 2 | public function toStrings(): array |
|
86 | |||
87 | /** |
||
88 | * @param string ...$string |
||
89 | * |
||
90 | * @return $this |
||
91 | */ |
||
92 | 1 | public function addString(string ...$string): self |
|
101 | |||
102 | /** |
||
103 | * @param Stringy ...$stringy |
||
104 | * |
||
105 | * @return $this |
||
106 | */ |
||
107 | 1 | public function addStringy(Stringy ...$stringy): self |
|
116 | |||
117 | /** |
||
118 | * @param string[] $strings |
||
119 | * |
||
120 | * @return static |
||
121 | */ |
||
122 | 2 | public static function createFromStrings($strings = []): self |
|
135 | } |
||
136 |
This checks looks for cases where a variable has been assigned to itself.
This assignement can be removed without consequences.