| Total Complexity | 8 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 42.86% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class RequestTransform implements RequestTransformInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var RequestTransformerInterface[]|\Closure[] |
||
| 14 | */ |
||
| 15 | protected $transformers; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * RequestTransform constructor. |
||
| 19 | * |
||
| 20 | * @param array $transformers |
||
| 21 | */ |
||
| 22 | 3 | public function __construct(array $transformers = []) |
|
| 25 | 3 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Tries to identify the data object sent, and convert them |
||
| 29 | * into an array properly handled |
||
| 30 | * |
||
| 31 | * @param array|object $formData |
||
| 32 | * |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | 2 | public function transform($formData = []) |
|
| 46 | } |
||
| 47 | |||
| 48 | |||
| 49 | /** |
||
| 50 | * Applied single request transformer |
||
| 51 | * |
||
| 52 | * @param RequestTransformerInterface|\Closure $transformer |
||
| 53 | * @param array|object $formData |
||
| 54 | */ |
||
| 55 | protected function applyRequestTransformers($transformer, $formData) |
||
| 66 |