File tree Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Expand file tree Collapse file tree 5 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 28
28
use Laudis \Neo4j \Contracts \FormatterInterface ;
29
29
use Laudis \Neo4j \Databags \BookmarkHolder ;
30
30
use Laudis \Neo4j \Databags \DatabaseInfo ;
31
- use Laudis \Neo4j \Databags \Neo4jError ;
32
31
use Laudis \Neo4j \Enum \AccessMode ;
33
32
use Laudis \Neo4j \Enum \ConnectionProtocol ;
34
33
use Laudis \Neo4j \Exception \Neo4jException ;
@@ -153,6 +152,7 @@ public function consumeResults(): void
153
152
{
154
153
if ($ this ->protocol ()->serverState !== ServerState::STREAMING && $ this ->protocol ()->serverState !== ServerState::TX_STREAMING ) {
155
154
$ this ->subscribedResults = [];
155
+
156
156
return ;
157
157
}
158
158
Original file line number Diff line number Diff line change 13
13
14
14
namespace Laudis \Neo4j \Bolt ;
15
15
16
- use Bolt \enum \ServerState ;
17
16
use function array_splice ;
18
17
use function count ;
19
18
Original file line number Diff line number Diff line change @@ -60,8 +60,7 @@ public function __construct(
60
60
private readonly SessionConfiguration $ config ,
61
61
private readonly TransactionConfiguration $ tsxConfig ,
62
62
private readonly BookmarkHolder $ bookmarkHolder
63
- ) {
64
- }
63
+ ) {}
65
64
66
65
/**
67
66
* @throws ClientException|Throwable
@@ -174,11 +173,7 @@ public function runStatements(iterable $statements): CypherList
174
173
}
175
174
176
175
/**
177
- * @param Neo4jException $e
178
- *
179
- * @return never
180
176
* @throws Neo4jException
181
- *
182
177
*/
183
178
private function handleMessageException (Neo4jException $ e ): never
184
179
{
@@ -187,9 +182,9 @@ private function handleMessageException(Neo4jException $e): never
187
182
$ this ->connection ->reset ();
188
183
}
189
184
if (!$ this ->isFinished () && in_array (
190
- $ exception ->getClassification (),
191
- TransactionHelper::ROLLBACK_CLASSIFICATIONS
192
- )) {
185
+ $ exception ->getClassification (),
186
+ TransactionHelper::ROLLBACK_CLASSIFICATIONS
187
+ )) {
193
188
$ this ->state = TransactionState::ROLLED_BACK ;
194
189
}
195
190
Original file line number Diff line number Diff line change 16
16
/**
17
17
* The state of a transaction.
18
18
*/
19
- enum TransactionState {
19
+ enum TransactionState
20
+ {
20
21
/**
21
- * The transaction is running with no explicit success or failure marked
22
+ * The transaction is running with no explicit success or failure marked.
22
23
*/
23
24
case ACTIVE ;
24
25
@@ -28,12 +29,12 @@ enum TransactionState {
28
29
case TERMINATED ;
29
30
30
31
/**
31
- * This transaction has successfully committed
32
+ * This transaction has successfully committed.
32
33
*/
33
34
case COMMITTED ;
34
35
35
36
/**
36
- * This transaction has been rolled back
37
+ * This transaction has been rolled back.
37
38
*/
38
39
case ROLLED_BACK ;
39
40
}
Original file line number Diff line number Diff line change 25
25
*/
26
26
final class ClientException extends RuntimeException
27
27
{
28
- /**
29
- * @param string $message
30
- * @param Throwable|null $previous
31
- */
32
28
public function __construct (string $ message , ?Throwable $ previous = null )
33
29
{
34
30
parent ::__construct ($ message , 0 , $ previous );
You can’t perform that action at this time.
0 commit comments