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 Aug 25, 2021
1 parent 19e2332 commit 40ebe67
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public function it_can_disable_excluding_data_dynamically_from_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
2 changes: 1 addition & 1 deletion tests/Factories/DataBlueprintFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function toString(): string
$class->setExtends(Data::class);

$methods = array_map(
fn(DataMagicMethodFactory $factory) => $factory->create(),
fn (DataMagicMethodFactory $factory) => $factory->create(),
$this->methods
);

Expand Down
4 changes: 0 additions & 4 deletions tests/Factories/DataMagicMethodFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

use Nette\PhpGenerator\Method;
use Nette\PhpGenerator\Parameter;
use Nette\PhpGenerator\PromotedParameter;
use Nette\PhpGenerator\Property;
use Spatie\LaravelData\DataCollection;
use Spatie\LaravelData\Lazy;

class DataMagicMethodFactory
{
Expand Down
3 changes: 1 addition & 2 deletions tests/RequestDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Illuminate\Testing\TestResponse;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Validator;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Tests\Factories\DataBlueprintFactory;
use Spatie\LaravelData\Tests\Factories\DataMagicMethodFactory;
use Spatie\LaravelData\Tests\Factories\DataPropertyBlueprintFactory;
Expand Down Expand Up @@ -87,7 +86,7 @@ public function it_can_overwrite_validation_attributes()
/** @test */
public function it_can_change_the_validator()
{
RequestData::$validatorClosure = fn(Validator $validator) => $validator->setRules([]);
RequestData::$validatorClosure = fn (Validator $validator) => $validator->setRules([]);

$this->invalidRequest()
->assertOk()
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::from('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::from('Simple data'), SimpleData::collection([]), ) extends Data {
public function __construct(
public null | int $nullable,
public int $int,
Expand Down

0 comments on commit 40ebe67

Please sign in to comment.