1111
1212class FractalTransformer
1313{
14- /**
15- * @var \League\Fractal\Manager
16- */
1714 protected Manager $ fractal ;
1815
1916 /**
2017 * FractalTransformer constructor.
21- *
22- * @param \League\Fractal\Manager $fractal
2318 */
2419 public function __construct (Manager $ fractal )
2520 {
@@ -28,16 +23,11 @@ public function __construct(Manager $fractal)
2823
2924 /**
3025 * Transform output using the given transformer and serializer.
31- *
32- * @param array|\Illuminate\Support\Collection $output
33- * @param iterable $transformer
34- * @param SerializerAbstract|null $serializer
35- * @return array
3626 */
3727 public function transform (
3828 array |LaravelCollection $ output ,
3929 iterable $ transformer ,
40- SerializerAbstract $ serializer = null
30+ ? SerializerAbstract $ serializer = null
4131 ): array {
4232 if ($ serializer !== null ) {
4333 $ this ->fractal ->setSerializer ($ this ->createSerializer ($ serializer ));
@@ -68,7 +58,6 @@ function ($item_collector, $item_transformed) {
6858 * Get or create transformer serializer instance.
6959 *
7060 * @param class-string|SerializerAbstract $serializer
71- * @return \League\Fractal\Serializer\SerializerAbstract
7261 */
7362 protected function createSerializer (SerializerAbstract |string $ serializer ): SerializerAbstract
7463 {
@@ -83,7 +72,6 @@ protected function createSerializer(SerializerAbstract|string $serializer): Seri
8372 * Get or create transformer instance.
8473 *
8574 * @param \Closure|class-string|TransformerAbstract $transformer
86- * @return \Closure|\League\Fractal\TransformerAbstract
8775 */
8876 protected function createTransformer (Closure |string |TransformerAbstract $ transformer ): Closure |TransformerAbstract
8977 {
0 commit comments