| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | final class KeyTransform implements Mapping |
||
| 9 | { |
||
| 10 | /** @var string */ |
||
| 11 | private $key; |
||
| 12 | /** @var Mapping */ |
||
| 13 | private $mapping; |
||
| 14 | |||
| 15 | private function __construct(string $key, Mapping $mapping) |
||
| 16 | { |
||
| 17 | $this->key = $key; |
||
| 18 | $this->mapping = $mapping; |
||
| 19 | } |
||
| 20 | |||
| 21 | public static function use(string $key, Mapping $mapping): Mapping |
||
| 22 | { |
||
| 23 | return new self($key, $mapping); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function name(): string |
||
| 29 | } |
||
| 30 | |||
| 31 | public function value(array $data, $owner = null) |
||
| 39 |