Skip to content

Commit 130c244

Browse files
rubenvanasschegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 2a81539 commit 130c244

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

tests/Actions/TranspileTypeToTypeScriptActionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
use phpDocumentor\Reflection\Types\Self_;
55
use phpDocumentor\Reflection\Types\Static_;
66
use phpDocumentor\Reflection\Types\This;
7+
use function PHPUnit\Framework\assertContains;
8+
use function PHPUnit\Framework\assertEquals;
9+
use function Spatie\Snapshots\assertMatchesSnapshot;
710
use Spatie\TypeScriptTransformer\Actions\TranspileTypeToTypeScriptAction;
11+
812
use Spatie\TypeScriptTransformer\Structures\MissingSymbolsCollection;
913
use Spatie\TypeScriptTransformer\Tests\FakeClasses\Enum\RegularEnum;
1014
use Spatie\TypeScriptTransformer\Types\StructType;
1115

12-
use function PHPUnit\Framework\assertContains;
13-
use function PHPUnit\Framework\assertEquals;
14-
use function Spatie\Snapshots\assertMatchesSnapshot;
15-
1616
beforeEach(function () {
1717
$this->missingSymbols = new MissingSymbolsCollection();
1818

tests/Transformers/DtoTransformerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
use phpDocumentor\Reflection\Type;
44
use phpDocumentor\Reflection\Types\String_;
5+
use function PHPUnit\Framework\assertEquals;
6+
use function Spatie\Snapshots\assertMatchesSnapshot;
7+
use function Spatie\Snapshots\assertMatchesTextSnapshot;
58
use Spatie\TypeScriptTransformer\Attributes\Hidden;
69
use Spatie\TypeScriptTransformer\Attributes\LiteralTypeScriptType;
710
use Spatie\TypeScriptTransformer\Attributes\Optional;
@@ -13,14 +16,11 @@
1316
use Spatie\TypeScriptTransformer\Tests\FakeClasses\Integration\Enum;
1417
use Spatie\TypeScriptTransformer\Tests\FakeClasses\Integration\LevelUp\YetAnotherDto;
1518
use Spatie\TypeScriptTransformer\Tests\FakeClasses\Integration\OtherDto;
19+
1620
use Spatie\TypeScriptTransformer\Transformers\DtoTransformer;
1721
use Spatie\TypeScriptTransformer\TypeProcessors\TypeProcessor;
1822
use Spatie\TypeScriptTransformer\TypeScriptTransformerConfig;
1923

20-
use function PHPUnit\Framework\assertEquals;
21-
use function Spatie\Snapshots\assertMatchesSnapshot;
22-
use function Spatie\Snapshots\assertMatchesTextSnapshot;
23-
2424
beforeEach(function () {
2525
$config = TypeScriptTransformerConfig::create()
2626
->defaultTypeReplacements([
@@ -49,10 +49,10 @@
4949
it('a type processor can remove properties', function () {
5050
$config = TypeScriptTransformerConfig::create();
5151

52-
$transformer = new class ($config) extends DtoTransformer {
52+
$transformer = new class($config) extends DtoTransformer {
5353
protected function typeProcessors(): array
5454
{
55-
$onlyStringPropertiesProcessor = new class () implements TypeProcessor {
55+
$onlyStringPropertiesProcessor = new class() implements TypeProcessor {
5656
public function process(
5757
Type $type,
5858
ReflectionProperty | ReflectionParameter | ReflectionMethod $reflection,
@@ -75,7 +75,7 @@ public function process(
7575
});
7676

7777
it('will take transform as typescript attributes into account', function () {
78-
$class = new class () {
78+
$class = new class() {
7979
#[TypeScriptType('int')]
8080
public $int;
8181

@@ -103,7 +103,7 @@ public function process(
103103
});
104104

105105
it('transforms properties to optional ones when using optional attribute', function () {
106-
$class = new class () {
106+
$class = new class() {
107107
#[Optional]
108108
public string $string;
109109
};
@@ -134,7 +134,7 @@ class DummyOptionalDto
134134

135135

136136
it('transforms properties to hidden ones when using hidden attribute', function () {
137-
$class = new class () {
137+
$class = new class() {
138138
public string $visible;
139139
#[Hidden]
140140
public string $hidden;
@@ -149,7 +149,7 @@ class DummyOptionalDto
149149
});
150150

151151
it('transforms nullable properties to optional ones according to config', function () {
152-
$class = new class () {
152+
$class = new class() {
153153
public ?string $string;
154154
};
155155

tests/Transformers/InterfaceTransformerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
use Spatie\TypeScriptTransformer\Tests\Fakes\FakeInterface;
4-
use Spatie\TypeScriptTransformer\Transformers\InterfaceTransformer;
5-
use Spatie\TypeScriptTransformer\TypeScriptTransformerConfig;
6-
73
use function PHPUnit\Framework\assertNotNull;
84
use function PHPUnit\Framework\assertNull;
95
use function Spatie\Snapshots\assertMatchesTextSnapshot;
106

7+
use Spatie\TypeScriptTransformer\Tests\Fakes\FakeInterface;
8+
use Spatie\TypeScriptTransformer\Transformers\InterfaceTransformer;
9+
use Spatie\TypeScriptTransformer\TypeScriptTransformerConfig;
10+
1111
it('will only convert interfaces', function () {
1212
$transformer = new InterfaceTransformer(
1313
TypeScriptTransformerConfig::create()

0 commit comments

Comments
 (0)