Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche authored and github-actions[bot] committed Sep 15, 2023
1 parent bc33d56 commit 21bad55
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/DataCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ public function offsetGet($offset): mixed
throw InvalidDataCollectionOperation::create();
}

$data = $this->items->offsetGet($offset);
$data = $this->items->offsetGet($offset);

if($data instanceof IncludeableDataContract){
if($data instanceof IncludeableDataContract) {
$data->withPartialTrees($this->getPartialTrees());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/DataCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
use Spatie\LaravelData\DataCollection;
use Spatie\LaravelData\PaginatedDataCollection;
use Spatie\LaravelData\Support\PartialTrees;
use Spatie\LaravelData\Tests\Fakes\ComplicatedData;
use Spatie\LaravelData\Tests\Fakes\DataCollections\CustomDataCollection;
use Spatie\LaravelData\Tests\Fakes\DataCollections\CustomPaginatedDataCollection;
use Spatie\LaravelData\Tests\Fakes\DefaultLazyData;
use Spatie\LaravelData\Tests\Fakes\LazyData;
use Spatie\LaravelData\Tests\Fakes\MultiData;
use Spatie\LaravelData\Tests\Fakes\SimpleData;

use function Spatie\Snapshots\assertMatchesJsonSnapshot;
use function Spatie\Snapshots\assertMatchesSnapshot;

Expand Down
2 changes: 1 addition & 1 deletion tests/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
use Spatie\LaravelData\Tests\Fakes\UnionData;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;
use Spatie\LaravelData\WithData;

use function Spatie\Snapshots\assertMatchesSnapshot;

it('can create a resource', function () {
Expand Down Expand Up @@ -2460,4 +2461,3 @@ public function __construct(
yield 'no params' => [[], 'Could not create `Spatie\LaravelData\Tests\Fakes\MultiData`: the constructor requires 2 parameters, 0 given. Parameters missing: first, second.'],
yield 'one param' => [['first' => 'First'], 'Could not create `Spatie\LaravelData\Tests\Fakes\MultiData`: the constructor requires 2 parameters, 1 given. Parameters given: first. Parameters missing: second.'],
]);

1 change: 0 additions & 1 deletion tests/Datasets/DataCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use Spatie\LaravelData\Tests\Fakes\SimpleData;


dataset('collection-operations', function () {
yield [
'operation' => 'filter',
Expand Down

0 comments on commit 21bad55

Please sign in to comment.