| @@ 312-316 (lines=5) @@ | ||
| 309 | */ |
|
| 310 | protected function getMutatedType($value, $dir = 'setter') |
|
| 311 | { |
|
| 312 | foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) { |
|
| 313 | if ($this->getValueType($value) == $mutated || $value instanceof $mutated) { |
|
| 314 | return $mutated; |
|
| 315 | } |
|
| 316 | } |
|
| 317 | } |
|
| 318 | ||
| 319 | /** |
|
| @@ 342-346 (lines=5) @@ | ||
| 339 | { |
|
| 340 | $type = $type ?: $this->getValueType($value); |
|
| 341 | ||
| 342 | foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) { |
|
| 343 | if ($type == $mutated || $value instanceof $mutated) { |
|
| 344 | return $mutator; |
|
| 345 | } |
|
| 346 | } |
|
| 347 | } |
|
| 348 | ||
| 349 | /** |
|