Skip to content

Commit 6ea062a

Browse files
committed
cs fix styling
1 parent 31e25bd commit 6ea062a

22 files changed

+78
-119
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/config": "^5.4 || ^6.0 || ^7.0"
2424
},
2525
"require-dev": {
26-
"friendsofphp/php-cs-fixer": "^3.30",
26+
"friendsofphp/php-cs-fixer": "^3.75",
2727
"kubawerlos/php-cs-fixer-custom-fixers": "^3.0",
2828
"matthiasnoback/symfony-dependency-injection-test": "^4.3 || ^5.0",
2929
"phpunit/phpunit": "^9.5",

src/Builders/ClientBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ final class ClientBuilder
2020

2121
/**
2222
* @psalm-mutation-free
23-
*
24-
* @param DriverSetupManager $driverSetups
2523
*/
2624
public function __construct(
2725
private SessionConfiguration $defaultSessionConfig,

src/Collector/Neo4jDataCollector.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
namespace Neo4j\Neo4jBundle\Collector;
66

77
use Neo4j\Neo4jBundle\EventListener\Neo4jProfileListener;
8-
use Override;
98
use Symfony\Bundle\FrameworkBundle\DataCollector\AbstractDataCollector;
109
use Symfony\Component\HttpFoundation\Request;
1110
use Symfony\Component\HttpFoundation\Response;
12-
use Throwable;
1311

1412
/**
1513
* @var array{
@@ -29,8 +27,8 @@ public function __construct(
2927
) {
3028
}
3129

32-
#[Override]
33-
public function collect(Request $request, Response $response, ?Throwable $exception = null): void
30+
#[\Override]
31+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
3432
{
3533
$t = $this;
3634
$profiledSummaries = $this->subscriber->getProfiledSummaries();
@@ -78,14 +76,14 @@ public function collect(Request $request, Response $response, ?Throwable $except
7876
$this->data['statements'] = $mergedArray;
7977
}
8078

81-
#[Override]
79+
#[\Override]
8280
public function reset(): void
8381
{
8482
parent::reset();
8583
$this->subscriber->reset();
8684
}
8785

88-
#[Override]
86+
#[\Override]
8987
public function getName(): string
9088
{
9189
return 'neo4j';
@@ -130,7 +128,7 @@ public function getQueryCount(): int
130128
return count($this->data['statements']);
131129
}
132130

133-
#[Override]
131+
#[\Override]
134132
public static function getTemplate(): ?string
135133
{
136134
return '@Neo4j/web_profiler.html.twig';

src/Decorators/SymfonyClient.php

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
use Laudis\Neo4j\Databags\TransactionConfiguration;
1616
use Laudis\Neo4j\Enum\AccessMode;
1717
use Laudis\Neo4j\Types\CypherList;
18-
use Laudis\Neo4j\Types\CypherMap;
1918
use Neo4j\Neo4jBundle\Factories\SymfonyDriverFactory;
20-
use Override;
2119

2220
final class SymfonyClient implements ClientInterface
2321
{
@@ -33,8 +31,6 @@ final class SymfonyClient implements ClientInterface
3331

3432
/**
3533
* @psalm-mutation-free
36-
*
37-
* @param DriverSetupManager $driverSetups
3834
*/
3935
public function __construct(
4036
private readonly DriverSetupManager $driverSetups,
@@ -54,13 +50,13 @@ public function getDefaultTransactionConfiguration(): TransactionConfiguration
5450
return $this->defaultTransactionConfiguration;
5551
}
5652

57-
#[Override]
53+
#[\Override]
5854
public function run(string $statement, iterable $parameters = [], ?string $alias = null): SummarizedResult
5955
{
6056
return $this->runStatement(Statement::create($statement, $parameters), $alias);
6157
}
6258

63-
#[Override]
59+
#[\Override]
6460
public function runStatement(Statement $statement, ?string $alias = null): SummarizedResult
6561
{
6662
return $this->runStatements([$statement], $alias)->first();
@@ -91,7 +87,7 @@ private function getSession(?string $alias = null): SymfonySession
9187
return $this->boundSessions[$alias] = $this->startSession($alias, $this->defaultSessionConfiguration);
9288
}
9389

94-
#[Override]
90+
#[\Override]
9591
public function runStatements(iterable $statements, ?string $alias = null): CypherList
9692
{
9793
$runner = $this->getRunner($alias);
@@ -102,7 +98,7 @@ public function runStatements(iterable $statements, ?string $alias = null): Cyph
10298
return $runner->runStatements($statements);
10399
}
104100

105-
#[Override]
101+
#[\Override]
106102
public function beginTransaction(?iterable $statements = null, ?string $alias = null, ?TransactionConfiguration $config = null): SymfonyTransaction
107103
{
108104
$session = $this->getSession($alias);
@@ -111,7 +107,7 @@ public function beginTransaction(?iterable $statements = null, ?string $alias =
111107
return $session->beginTransaction($statements, $config);
112108
}
113109

114-
#[Override]
110+
#[\Override]
115111
public function getDriver(?string $alias): SymfonyDriver
116112
{
117113
return $this->factory->createDriver(
@@ -138,7 +134,7 @@ private function startSession(?string $alias, SessionConfiguration $configuratio
138134
*
139135
* @return HandlerResult
140136
*/
141-
#[Override]
137+
#[\Override]
142138
public function writeTransaction(callable $tsxHandler, ?string $alias = null, ?TransactionConfiguration $config = null): mixed
143139
{
144140
if ($this->defaultSessionConfiguration->getAccessMode() === AccessMode::WRITE()) {
@@ -158,7 +154,7 @@ public function writeTransaction(callable $tsxHandler, ?string $alias = null, ?T
158154
*
159155
* @return HandlerResult
160156
*/
161-
#[Override]
157+
#[\Override]
162158
public function readTransaction(callable $tsxHandler, ?string $alias = null, ?TransactionConfiguration $config = null): mixed
163159
{
164160
if ($this->defaultSessionConfiguration->getAccessMode() === AccessMode::READ()) {
@@ -178,25 +174,25 @@ public function readTransaction(callable $tsxHandler, ?string $alias = null, ?Tr
178174
*
179175
* @return HandlerResult
180176
*/
181-
#[Override]
177+
#[\Override]
182178
public function transaction(callable $tsxHandler, ?string $alias = null, ?TransactionConfiguration $config = null)
183179
{
184180
return $this->writeTransaction($tsxHandler, $alias, $config);
185181
}
186182

187-
#[Override]
183+
#[\Override]
188184
public function verifyConnectivity(?string $driver = null): bool
189185
{
190186
return $this->driverSetups->verifyConnectivity($this->defaultSessionConfiguration, $driver);
191187
}
192188

193-
#[Override]
189+
#[\Override]
194190
public function hasDriver(string $alias): bool
195191
{
196192
return $this->driverSetups->hasDriver($alias);
197193
}
198194

199-
#[Override]
195+
#[\Override]
200196
public function bindTransaction(?string $alias = null, ?TransactionConfiguration $config = null): void
201197
{
202198
$alias ??= $this->driverSetups->getDefaultAlias();
@@ -205,7 +201,7 @@ public function bindTransaction(?string $alias = null, ?TransactionConfiguration
205201
$this->boundTransactions[$alias][] = $this->beginTransaction(null, $alias, $config);
206202
}
207203

208-
#[Override]
204+
#[\Override]
209205
public function rollbackBoundTransaction(?string $alias = null, int $depth = 1): void
210206
{
211207
$this->popTransactions(static fn (SymfonyTransaction $tsx) => $tsx->rollback(), $alias, $depth);
@@ -231,7 +227,7 @@ private function popTransactions(callable $handler, ?string $alias = null, int $
231227
}
232228
}
233229

234-
#[Override]
230+
#[\Override]
235231
public function commitBoundTransaction(?string $alias = null, int $depth = 1): void
236232
{
237233
$this->popTransactions(static fn (UnmanagedTransactionInterface $tsx) => $tsx->commit(), $alias, $depth);

src/Decorators/SymfonyDriver.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Laudis\Neo4j\Contracts\DriverInterface;
77
use Laudis\Neo4j\Databags\SessionConfiguration;
88
use Neo4j\Neo4jBundle\Factories\SymfonyDriverFactory;
9-
use Override;
109

1110
/**
1211
* @psalm-suppress MissingImmutableAnnotation
@@ -21,19 +20,19 @@ public function __construct(
2120
) {
2221
}
2322

24-
#[Override]
23+
#[\Override]
2524
public function createSession(?SessionConfiguration $config = null): SymfonySession
2625
{
2726
return $this->factory->createSession($this->driver, $config, $this->alias, $this->schema);
2827
}
2928

30-
#[Override]
29+
#[\Override]
3130
public function verifyConnectivity(?SessionConfiguration $config = null): bool
3231
{
3332
return $this->driver->verifyConnectivity();
3433
}
3534

36-
#[Override]
35+
#[\Override]
3736
public function closeConnections(): void
3837
{
3938
$this->driver->closeConnections();

src/Decorators/SymfonySession.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
use Laudis\Neo4j\Databags\SummarizedResult;
1111
use Laudis\Neo4j\Databags\TransactionConfiguration;
1212
use Laudis\Neo4j\Types\CypherList;
13-
use Laudis\Neo4j\Types\CypherMap;
1413
use Neo4j\Neo4jBundle\EventHandler;
1514
use Neo4j\Neo4jBundle\Factories\SymfonyDriverFactory;
16-
use Override;
1715

1816
final class SymfonySession implements SessionInterface
1917
{
@@ -26,7 +24,7 @@ public function __construct(
2624
) {
2725
}
2826

29-
#[Override]
27+
#[\Override]
3028
public function runStatements(iterable $statements, ?TransactionConfiguration $config = null): CypherList
3129
{
3230
$tbr = [];
@@ -37,7 +35,7 @@ public function runStatements(iterable $statements, ?TransactionConfiguration $c
3735
return CypherList::fromIterable($tbr);
3836
}
3937

40-
#[Override]
38+
#[\Override]
4139
public function runStatement(Statement $statement, ?TransactionConfiguration $config = null): SummarizedResult
4240
{
4341
return $this->handler->handleQuery(
@@ -49,13 +47,13 @@ public function runStatement(Statement $statement, ?TransactionConfiguration $co
4947
);
5048
}
5149

52-
#[Override]
50+
#[\Override]
5351
public function run(string $statement, iterable $parameters = [], ?TransactionConfiguration $config = null): SummarizedResult
5452
{
5553
return $this->runStatement(new Statement($statement, $parameters));
5654
}
5755

58-
#[Override]
56+
#[\Override]
5957
public function beginTransaction(?iterable $statements = null, ?TransactionConfiguration $config = null): SymfonyTransaction
6058
{
6159
return $this->factory->createTransaction(
@@ -75,7 +73,7 @@ public function beginTransaction(?iterable $statements = null, ?TransactionConfi
7573
*
7674
* @psalm-suppress ArgumentTypeCoercion
7775
*/
78-
#[Override]
76+
#[\Override]
7977
public function writeTransaction(callable $tsxHandler, ?TransactionConfiguration $config = null)
8078
{
8179
return TransactionHelper::retry(
@@ -91,7 +89,7 @@ public function writeTransaction(callable $tsxHandler, ?TransactionConfiguration
9189
*
9290
* @return HandlerResult
9391
*/
94-
#[Override]
92+
#[\Override]
9593
public function readTransaction(callable $tsxHandler, ?TransactionConfiguration $config = null)
9694
{
9795
// TODO: create read transaction here.
@@ -105,13 +103,13 @@ public function readTransaction(callable $tsxHandler, ?TransactionConfiguration
105103
*
106104
* @return HandlerResult
107105
*/
108-
#[Override]
106+
#[\Override]
109107
public function transaction(callable $tsxHandler, ?TransactionConfiguration $config = null)
110108
{
111109
return $this->writeTransaction($tsxHandler, $config);
112110
}
113111

114-
#[Override]
112+
#[\Override]
115113
public function getLastBookmark(): Bookmark
116114
{
117115
return $this->session->getLastBookmark();

src/Decorators/SymfonyTransaction.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
use Laudis\Neo4j\Databags\SummarizedResult;
1010
use Laudis\Neo4j\Enum\TransactionState;
1111
use Laudis\Neo4j\Types\CypherList;
12-
use Laudis\Neo4j\Types\CypherMap;
1312
use Neo4j\Neo4jBundle\EventHandler;
14-
use Override;
1513

1614
final class SymfonyTransaction implements UnmanagedTransactionInterface
1715
{
18-
/**
19-
* @param UnmanagedTransactionInterface $tsx
20-
*/
2116
public function __construct(
2217
private readonly UnmanagedTransactionInterface $tsx,
2318
private readonly EventHandler $handler,
@@ -27,13 +22,13 @@ public function __construct(
2722
) {
2823
}
2924

30-
#[Override]
25+
#[\Override]
3126
public function run(string $statement, iterable $parameters = []): SummarizedResult
3227
{
3328
return $this->runStatement(new Statement($statement, $parameters));
3429
}
3530

36-
#[Override]
31+
#[\Override]
3732
public function runStatement(Statement $statement): SummarizedResult
3833
{
3934
return $this->handler->handleQuery(fn (Statement $statement) => $this->tsx->runStatement($statement),
@@ -47,7 +42,7 @@ public function runStatement(Statement $statement): SummarizedResult
4742
/**
4843
* @psalm-suppress InvalidReturnStatement
4944
*/
50-
#[Override]
45+
#[\Override]
5146
public function runStatements(iterable $statements): CypherList
5247
{
5348
$tbr = [];
@@ -58,7 +53,7 @@ public function runStatements(iterable $statements): CypherList
5853
return CypherList::fromIterable($tbr);
5954
}
6055

61-
#[Override]
56+
#[\Override]
6257
public function commit(iterable $statements = []): CypherList
6358
{
6459
$results = $this->runStatements($statements);
@@ -74,7 +69,7 @@ public function commit(iterable $statements = []): CypherList
7469
return $results;
7570
}
7671

77-
#[Override]
72+
#[\Override]
7873
public function rollback(): void
7974
{
8075
$this->handler->handleTransactionAction(
@@ -86,19 +81,19 @@ public function rollback(): void
8681
);
8782
}
8883

89-
#[Override]
84+
#[\Override]
9085
public function isRolledBack(): bool
9186
{
9287
return $this->tsx->isRolledBack();
9388
}
9489

95-
#[Override]
90+
#[\Override]
9691
public function isCommitted(): bool
9792
{
9893
return $this->tsx->isCommitted();
9994
}
10095

101-
#[Override]
96+
#[\Override]
10297
public function isFinished(): bool
10398
{
10499
return $this->tsx->isFinished();

0 commit comments

Comments
 (0)