15
15
use Laudis \Neo4j \Databags \TransactionConfiguration ;
16
16
use Laudis \Neo4j \Enum \AccessMode ;
17
17
use Laudis \Neo4j \Types \CypherList ;
18
- use Laudis \Neo4j \Types \CypherMap ;
19
18
use Neo4j \Neo4jBundle \Factories \SymfonyDriverFactory ;
20
- use Override ;
21
19
22
20
final class SymfonyClient implements ClientInterface
23
21
{
@@ -33,8 +31,6 @@ final class SymfonyClient implements ClientInterface
33
31
34
32
/**
35
33
* @psalm-mutation-free
36
- *
37
- * @param DriverSetupManager $driverSetups
38
34
*/
39
35
public function __construct (
40
36
private readonly DriverSetupManager $ driverSetups ,
@@ -54,13 +50,13 @@ public function getDefaultTransactionConfiguration(): TransactionConfiguration
54
50
return $ this ->defaultTransactionConfiguration ;
55
51
}
56
52
57
- #[Override]
53
+ #[\ Override]
58
54
public function run (string $ statement , iterable $ parameters = [], ?string $ alias = null ): SummarizedResult
59
55
{
60
56
return $ this ->runStatement (Statement::create ($ statement , $ parameters ), $ alias );
61
57
}
62
58
63
- #[Override]
59
+ #[\ Override]
64
60
public function runStatement (Statement $ statement , ?string $ alias = null ): SummarizedResult
65
61
{
66
62
return $ this ->runStatements ([$ statement ], $ alias )->first ();
@@ -91,7 +87,7 @@ private function getSession(?string $alias = null): SymfonySession
91
87
return $ this ->boundSessions [$ alias ] = $ this ->startSession ($ alias , $ this ->defaultSessionConfiguration );
92
88
}
93
89
94
- #[Override]
90
+ #[\ Override]
95
91
public function runStatements (iterable $ statements , ?string $ alias = null ): CypherList
96
92
{
97
93
$ runner = $ this ->getRunner ($ alias );
@@ -102,7 +98,7 @@ public function runStatements(iterable $statements, ?string $alias = null): Cyph
102
98
return $ runner ->runStatements ($ statements );
103
99
}
104
100
105
- #[Override]
101
+ #[\ Override]
106
102
public function beginTransaction (?iterable $ statements = null , ?string $ alias = null , ?TransactionConfiguration $ config = null ): SymfonyTransaction
107
103
{
108
104
$ session = $ this ->getSession ($ alias );
@@ -111,7 +107,7 @@ public function beginTransaction(?iterable $statements = null, ?string $alias =
111
107
return $ session ->beginTransaction ($ statements , $ config );
112
108
}
113
109
114
- #[Override]
110
+ #[\ Override]
115
111
public function getDriver (?string $ alias ): SymfonyDriver
116
112
{
117
113
return $ this ->factory ->createDriver (
@@ -138,7 +134,7 @@ private function startSession(?string $alias, SessionConfiguration $configuratio
138
134
*
139
135
* @return HandlerResult
140
136
*/
141
- #[Override]
137
+ #[\ Override]
142
138
public function writeTransaction (callable $ tsxHandler , ?string $ alias = null , ?TransactionConfiguration $ config = null ): mixed
143
139
{
144
140
if ($ this ->defaultSessionConfiguration ->getAccessMode () === AccessMode::WRITE ()) {
@@ -158,7 +154,7 @@ public function writeTransaction(callable $tsxHandler, ?string $alias = null, ?T
158
154
*
159
155
* @return HandlerResult
160
156
*/
161
- #[Override]
157
+ #[\ Override]
162
158
public function readTransaction (callable $ tsxHandler , ?string $ alias = null , ?TransactionConfiguration $ config = null ): mixed
163
159
{
164
160
if ($ this ->defaultSessionConfiguration ->getAccessMode () === AccessMode::READ ()) {
@@ -178,25 +174,25 @@ public function readTransaction(callable $tsxHandler, ?string $alias = null, ?Tr
178
174
*
179
175
* @return HandlerResult
180
176
*/
181
- #[Override]
177
+ #[\ Override]
182
178
public function transaction (callable $ tsxHandler , ?string $ alias = null , ?TransactionConfiguration $ config = null )
183
179
{
184
180
return $ this ->writeTransaction ($ tsxHandler , $ alias , $ config );
185
181
}
186
182
187
- #[Override]
183
+ #[\ Override]
188
184
public function verifyConnectivity (?string $ driver = null ): bool
189
185
{
190
186
return $ this ->driverSetups ->verifyConnectivity ($ this ->defaultSessionConfiguration , $ driver );
191
187
}
192
188
193
- #[Override]
189
+ #[\ Override]
194
190
public function hasDriver (string $ alias ): bool
195
191
{
196
192
return $ this ->driverSetups ->hasDriver ($ alias );
197
193
}
198
194
199
- #[Override]
195
+ #[\ Override]
200
196
public function bindTransaction (?string $ alias = null , ?TransactionConfiguration $ config = null ): void
201
197
{
202
198
$ alias ??= $ this ->driverSetups ->getDefaultAlias ();
@@ -205,7 +201,7 @@ public function bindTransaction(?string $alias = null, ?TransactionConfiguration
205
201
$ this ->boundTransactions [$ alias ][] = $ this ->beginTransaction (null , $ alias , $ config );
206
202
}
207
203
208
- #[Override]
204
+ #[\ Override]
209
205
public function rollbackBoundTransaction (?string $ alias = null , int $ depth = 1 ): void
210
206
{
211
207
$ this ->popTransactions (static fn (SymfonyTransaction $ tsx ) => $ tsx ->rollback (), $ alias , $ depth );
@@ -231,7 +227,7 @@ private function popTransactions(callable $handler, ?string $alias = null, int $
231
227
}
232
228
}
233
229
234
- #[Override]
230
+ #[\ Override]
235
231
public function commitBoundTransaction (?string $ alias = null , int $ depth = 1 ): void
236
232
{
237
233
$ this ->popTransactions (static fn (UnmanagedTransactionInterface $ tsx ) => $ tsx ->commit (), $ alias , $ depth );
0 commit comments