1 | <?php |
||
17 | trait Transmutable |
||
18 | { |
||
19 | /** |
||
20 | * @return StringType |
||
21 | */ |
||
22 | 35 | public function toStringType(): StringType |
|
26 | |||
27 | /** |
||
28 | * @return BooleanType |
||
29 | */ |
||
30 | 3 | public function toBoolType(): BooleanType |
|
34 | |||
35 | /** |
||
36 | * @return IntType |
||
37 | */ |
||
38 | 4 | public function toIntType(): IntType |
|
42 | |||
43 | /** |
||
44 | * @return FloatType |
||
45 | */ |
||
46 | 5 | public function toFloatType(): FloatType |
|
50 | |||
51 | /** |
||
52 | * @return Collection |
||
53 | */ |
||
54 | 2 | public function toCollection(): Collection |
|
58 | |||
59 | /** |
||
60 | * @return bool |
||
61 | */ |
||
62 | 1 | public function toBool(): bool |
|
70 | |||
71 | /** |
||
72 | * @return int |
||
73 | */ |
||
74 | 1 | public function toInt(): int |
|
82 | |||
83 | /** |
||
84 | * @return float |
||
85 | */ |
||
86 | 1 | public function toFloat(): float |
|
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | 7 | public function toString(): string |
|
106 | |||
107 | /** |
||
108 | * @return array |
||
109 | */ |
||
110 | 19 | public function toArray(): array |
|
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | public function __toString(): string |
||
123 | { |
||
124 | return $this->toString(); |
||
125 | } |
||
126 | |||
127 | private function createInvalidTransformationException($type) |
||
131 | } |
||
132 |