Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Apr 4, 2024
1 parent 78d14c1 commit adfe91a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/Resolvers/TransformedDataCollectableResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Spatie\LaravelData\Support\Wrapping\Wrap;
use Spatie\LaravelData\Support\Wrapping\WrapExecutionType;
use Spatie\LaravelData\Support\Wrapping\WrapType;
use TestDataCollectionWithNested;

class TransformedDataCollectableResolver
{
Expand Down Expand Up @@ -126,21 +125,7 @@ protected function transformationClosure(
return $data;
}

$clonedContext = clone $nestedContext;

if($data::class === TestDataCollectionWithNested::class) {
ray((string) $clonedContext);
}

$transformed = $data->transform($clonedContext);

if($data::class === TestDataCollectionWithNested::class) {
ray($nestedContext, $clonedContext);
}

return $transformed;

// return $data->transform(clone $nestedContext);
return $data->transform(clone $nestedContext);
};
}
}

0 comments on commit adfe91a

Please sign in to comment.