1 | <?php |
||
12 | class CollectionStringy extends \Arrayy\Collection\Collection |
||
13 | { |
||
14 | 83 | public function getType(): string |
|
18 | |||
19 | /** |
||
20 | * @return Stringy[] |
||
21 | * |
||
22 | * @psalm-return array<array-key,Stringy> |
||
23 | * |
||
24 | * @noinspection SenselessProxyMethodInspection - other phpdocs ;) |
||
25 | */ |
||
26 | public function getAll(): array |
||
30 | |||
31 | /** |
||
32 | * @return \Generator|Stringy[] |
||
33 | * |
||
34 | * @psalm-return \Generator<mixed,Stringy>|\Generator<TKey,Stringy> |
||
35 | * @psalm-mutation-free |
||
36 | * |
||
37 | * @noinspection PhpInconsistentReturnPointsInspection |
||
38 | * @noinspection SenselessProxyMethodInspection - other phpdocs ;) |
||
39 | */ |
||
40 | 82 | public function getGenerator(): \Generator |
|
44 | |||
45 | /** |
||
46 | * @return string[] |
||
47 | */ |
||
48 | 2 | public function toStrings(): array |
|
60 | |||
61 | /** |
||
62 | * @param string ...$string |
||
63 | * |
||
64 | * @return $this |
||
65 | * |
||
66 | * @noinspection PhpDocSignatureInspection |
||
67 | */ |
||
68 | 1 | public function addString(string ...$string): self |
|
76 | |||
77 | /** |
||
78 | * @param Stringy ...$stringy |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | 1 | public function addStringy(Stringy ...$stringy): self |
|
90 | |||
91 | /** |
||
92 | * @param string[] $strings |
||
93 | * |
||
94 | * @return static |
||
95 | */ |
||
96 | 2 | public static function createFromStrings($strings = []): self |
|
109 | } |
||
110 |
This checks looks for cases where a variable has been assigned to itself.
This assignement can be removed without consequences.