1 | <?php |
||
11 | class FractalTransformer implements Transformer |
||
12 | { |
||
13 | /** |
||
14 | * Fractal. |
||
15 | * |
||
16 | * @var League\Fractal\Manager |
||
17 | */ |
||
18 | protected $fractal; |
||
19 | |||
20 | /** |
||
21 | * Function to generate a route (for collections). |
||
22 | * |
||
23 | * @var callable |
||
24 | */ |
||
25 | protected $route_generator; |
||
26 | |||
27 | /** |
||
28 | * Create a new fractal transformer instance. |
||
29 | * |
||
30 | * @param League\Fractal\Manager $fractal |
||
31 | * @param callable $route_generator |
||
32 | */ |
||
33 | public function __construct(Fractal\Manager $fractal, callable $route_generator = null) |
||
38 | |||
39 | /** |
||
40 | * Transform a response with a transformer. |
||
41 | * |
||
42 | * @param mixed $value |
||
43 | * @param League\Fractal\TransformerAbstract $transformer |
||
44 | * @param array $includes Optional |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public function transform($value, $transformer, $includes = []) |
||
58 | |||
59 | /** |
||
60 | * Create a Fractal resource instance. |
||
61 | * |
||
62 | * @param mixed $value |
||
63 | * @param League\Fractal\TransformerAbstract $transformer |
||
64 | * |
||
65 | * @return League\Fractal\Resource\ResourceAbstract |
||
66 | */ |
||
67 | protected function createResource($value, TransformerAbstract $transformer) |
||
82 | } |
||
83 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..