1 | <?php |
||
19 | abstract class AbstractResourceTransformer extends AbstractTransformer implements ResourceTransformerInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var mixed |
||
23 | */ |
||
24 | protected $data; |
||
25 | |||
26 | /** |
||
27 | * @var callable|TransformerInterface |
||
28 | */ |
||
29 | protected $transformer; |
||
30 | |||
31 | /** |
||
32 | * @param Scope $scope |
||
33 | * @return ResourceInterface |
||
34 | */ |
||
35 | abstract protected function createResource(Scope $scope): ResourceInterface; |
||
36 | |||
37 | /** |
||
38 | * @param Scope $scope |
||
39 | * @return mixed |
||
40 | */ |
||
41 | protected function getData(Scope $scope) |
||
45 | |||
46 | /** |
||
47 | * @param Scope $scope |
||
48 | * @param string|null $identifier |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function transform(Scope $scope, string $identifier = null) |
||
66 | |||
67 | /** |
||
68 | * @param callable $transformer |
||
69 | * @return $this |
||
70 | */ |
||
71 | public function setTransformer(callable $transformer) |
||
76 | |||
77 | /** |
||
78 | * @param mixed $data |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function setData($data) |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | */ |
||
90 | public function __invoke($data, Scope $scope, string $identifier = null) |
||
94 | } |
||
95 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.