Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche authored and actions-user committed Jul 26, 2021
1 parent ac2347a commit a1a9d4f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Casts/CarbonCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Spatie\LaravelData\Casts;

use Carbon\Carbon;
use DateTime;
use Spatie\LaravelData\Support\DataProperty;

class CarbonCast extends DateTimeInterfaceCast
Expand Down
2 changes: 0 additions & 2 deletions src/Casts/CarbonImmutableCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Spatie\LaravelData\Casts;

use Carbon\Carbon;
use Carbon\CarbonImmutable;
use DateTime;
use Spatie\LaravelData\Support\DataProperty;

class CarbonImmutableCast extends DateTimeInterfaceCast
Expand Down
1 change: 0 additions & 1 deletion src/Casts/DateTimeImmutableCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Spatie\LaravelData\Casts;

use DateTime;
use DateTimeImmutable;
use Spatie\LaravelData\Support\DataProperty;

Expand Down
4 changes: 2 additions & 2 deletions tests/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(
/** @test */
public function it_can_include_a_nested_lazy_property()
{
$data = new class(Lazy::create(fn () => LazyData::create('Hello')), Lazy::create(fn () => LazyData::collection([ 'is', 'it', 'me', 'your', 'looking', 'for', ])), ) extends Data {
$data = new class(Lazy::create(fn () => LazyData::create('Hello')), Lazy::create(fn () => LazyData::collection([ 'is', 'it', 'me', 'your', 'looking', 'for', ])),) extends Data {
public function __construct(
public Lazy | LazyData $data,
/** @var \Spatie\LaravelData\Tests\Fakes\LazyData[] */
Expand Down Expand Up @@ -330,7 +330,7 @@ public function it_can_dynamically_include_data_based_upon_the_request()
/** @test */
public function it_can_get_the_data_object_without_transforming()
{
$data = new class($dataObject = new SimpleData('Test'), $dataCollection = SimpleData::collection([ new SimpleData('A'), new SimpleData('B'), ]), Lazy::create(fn () => new SimpleData('Lazy')), 'Test', $transformable = new DateTime('16 may 1994'), ) extends Data {
$data = new class($dataObject = new SimpleData('Test'), $dataCollection = SimpleData::collection([ new SimpleData('A'), new SimpleData('B'), ]), Lazy::create(fn () => new SimpleData('Lazy')), 'Test', $transformable = new DateTime('16 may 1994'),) extends Data {
public function __construct(
public SimpleData $data,
public DataCollection $dataCollection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function it_can_covert_a_data_object_to_typescript()
{
$config = TypeScriptTransformerConfig::create();

$data = new class(null, 42, true, 'Hello world', 3.14, ['the', 'meaning', 'of', 'life'], Lazy::create(fn () => 'Lazy'), SimpleData::create('Simple data'), SimpleData::collection([]), ) extends Data {
$data = new class(null, 42, true, 'Hello world', 3.14, ['the', 'meaning', 'of', 'life'], Lazy::create(fn () => 'Lazy'), SimpleData::create('Simple data'), SimpleData::collection([]),) extends Data {
public function __construct(
public null | int $nullable,
public int $int,
Expand Down

0 comments on commit a1a9d4f

Please sign in to comment.