Skip to content

Commit a6f46a3

Browse files
committed
Apply code style to tests files
1 parent ccf28fa commit a6f46a3

File tree

271 files changed

+7692
-8048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+7692
-8048
lines changed

.php-cs-fixer.dist.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
return \Spiral\CodeStyle\Builder::create()
88
->include(__DIR__ . '/src')
9+
->include(__DIR__ . '/tests')
910
->include(__FILE__)
1011
->cache('./runtime/php-cs-fixer.cache')
11-
->allowRisky()
12+
->allowRisky(false)
1213
->build();

src/Select/RootLoader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ final class RootLoader extends AbstractLoader
3333
'load' => true,
3434
'scope' => true,
3535
];
36-
3736
private SelectQuery $query;
3837

3938
/**

tests/ORM/Fixtures/Comment.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
class Comment
1212
{
1313
public $id;
14-
1514
public $message;
1615

1716
/** @var User */
@@ -21,9 +20,7 @@ class Comment
2120
public $favoredBy;
2221

2322
public $parent;
24-
2523
public $level;
26-
2724
public UserWithUUIDPrimaryKey $userWithUuid;
2825

2926
public function __construct()

tests/ORM/Fixtures/CompositePK.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ class CompositePK
1414
public $key2;
1515
public $key3;
1616
public $key4;
17-
1817
public $child_entity;
19-
2018
public $child_key1;
2119
public $child_key2;
2220
public $child_key3;
2321
public $child_key4;
24-
2522
public $children;
2623
public $pivoted;
2724

tests/ORM/Fixtures/CompositePKChild.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ class CompositePKChild
1313
public $key2;
1414
public $key3;
1515
public $key4;
16-
1716
public $parent_key1;
1817
public $parent_key2;
1918
public $parent_key3;
2019
public $parent_key4;
21-
2220
public $parent;
2321
public $nested;
2422
public $pivoted;

tests/ORM/Fixtures/CompositePKNested.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ class CompositePKNested
1111
public $key2;
1212
public $key3;
1313
public $key4;
14-
1514
public $parent_key1;
1615
public $parent_key2;
1716
public $parent_key3;
1817
public $parent_key4;
19-
2018
public $parent;
2119
}

tests/ORM/Fixtures/CompositePKPivot.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@ class CompositePKPivot
1111
public $key2;
1212
public $key3;
1313
public $key4;
14-
1514
public $parent_key1;
1615
public $parent_key2;
1716
public $parent_key3;
1817
public $parent_key4;
19-
2018
public $child_key1;
2119
public $child_key2;
2220
public $child_key3;
2321
public $child_key4;
24-
2522
public $as;
2623
}

tests/ORM/Fixtures/CustomCollection.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77

88
use Doctrine\Common\Collections\ArrayCollection;
99

10-
final class CustomCollection extends ArrayCollection
11-
{
12-
}
10+
final class CustomCollection extends ArrayCollection {}

tests/ORM/Fixtures/CyclicRef/Comment.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Comment
99
{
1010
public $id;
1111
public $post_id;
12-
1312
public $message;
1413

1514
/** @var User */

tests/ORM/Fixtures/CyclicRef/TimestampedMapper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Cycle\ORM\Heap\Node;
1212
use Cycle\ORM\Heap\State;
1313
use Cycle\ORM\Mapper\Mapper;
14-
use DateTimeImmutable;
1514

1615
class TimestampedMapper extends Mapper
1716
{
@@ -20,7 +19,7 @@ public function queueCreate($entity, Node $node, State $state): CommandInterface
2019
/** @var Insert $cmd */
2120
$cmd = parent::queueCreate($entity, $node, $state);
2221

23-
$dt = new DateTimeImmutable();
22+
$dt = new \DateTimeImmutable();
2423
$state->register('created_at', $dt);
2524
$state->register('updated_at', $dt);
2625

@@ -32,7 +31,7 @@ public function queueUpdate($entity, Node $node, State $state): CommandInterface
3231
/** @var Update $cmd */
3332
$cmd = parent::queueUpdate($entity, $node, $state);
3433

35-
$cmd->registerAppendix('updated_at', new DateTimeImmutable());
34+
$cmd->registerAppendix('updated_at', new \DateTimeImmutable());
3635

3736
return $cmd;
3837
}

0 commit comments

Comments
 (0)