| @@ 286-290 (lines=5) @@ | ||
| 283 | */ |
|
| 284 | protected function getMutatedType($value, $dir = 'setter') |
|
| 285 | { |
|
| 286 | foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) { |
|
| 287 | if ($this->getValueType($value) == $mutated || $value instanceof $mutated) { |
|
| 288 | return $mutated; |
|
| 289 | } |
|
| 290 | } |
|
| 291 | } |
|
| 292 | ||
| 293 | /** |
|
| @@ 316-320 (lines=5) @@ | ||
| 313 | { |
|
| 314 | $type = $type ?: $this->getValueType($value); |
|
| 315 | ||
| 316 | foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) { |
|
| 317 | if ($type == $mutated || $value instanceof $mutated) { |
|
| 318 | return $mutator; |
|
| 319 | } |
|
| 320 | } |
|
| 321 | } |
|
| 322 | ||
| 323 | /** |
|