Skip to content

Commit 48b0cd7

Browse files
committed
fixed static analysis
1 parent 73212fb commit 48b0cd7

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

.github/workflows/static.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ jobs:
1717
- name: Download dependencies
1818
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
1919

20-
- name: PHPStan
21-
uses: docker://oskarstark/phpstan-ga
22-
env:
23-
REQUIRE_DEV: false
24-
CHECK_PLATFORM_REQUIREMENTS: false
25-
with:
26-
args: analyze --no-progress
27-
2820
php-cs-fixer:
2921
name: PHP-CS-Fixer
3022
runs-on: ubuntu-latest

Collector/QueryLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function finish(SummarizedResult $result): void
7373
$summary = $result->getSummary();
7474
$this->statements[$id] = array_merge($this->statements[$id], [
7575
'end_time' => $summary->getResultConsumedAfter(),
76-
'nb_results' => $result->getResult()->count(),
76+
'nb_results' => $result->count(),
7777
'statistics' => iterator_to_array($summary->getCounters()->getIterator(), true),
7878
'scheme' => $summary->getServerInfo()->getAddress()->getScheme(),
7979
'success' => true,

DependencyInjection/Configuration.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ public function __construct(bool $debug)
3030
}
3131

3232
/**
33+
* @psalm-suppress All
3334
* {@inheritdoc}
3435
*/
3536
public function getConfigTreeBuilder(): TreeBuilder
3637
{
3738
$treeBuilder = new TreeBuilder('neo4j');
3839

3940
/*
40-
* @psalm-suppress all
4141
* @phpstan-ignore-next-line
42+
* @psalm-suppress All
4243
*/
43-
$treeBuilder->getRootNode()->children()
44+
$treeBuilder->getRootNode()
45+
->children()
4446
->arrayNode('profiling')
4547
->addDefaultsIfNotSet()
4648
->treatFalseLike(['enabled' => false])

SymfonyClient.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public function writeTransaction(callable $tsxHandler, ?string $alias = null, ?T
8080

8181
return TransactionHelper::retry(
8282
fn () => new SymfonyTransaction($session->beginTransaction([], $config), $this->handler),
83-
$tsxHandler,
84-
$config ?? TransactionConfiguration::default()
83+
$tsxHandler
8584
);
8685
}
8786

@@ -92,8 +91,7 @@ public function readTransaction(callable $tsxHandler, ?string $alias = null, ?Tr
9291

9392
return TransactionHelper::retry(
9493
fn () => new SymfonyTransaction($session->beginTransaction([], $config), $this->handler),
95-
$tsxHandler,
96-
$config ?? TransactionConfiguration::default()
94+
$tsxHandler
9795
);
9896
}
9997

SymfonyTransaction.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,19 @@ public function rollback(): void
5858
{
5959
$this->tsx->rollback();
6060
}
61+
62+
public function isRolledBack(): bool
63+
{
64+
return $this->tsx->isRolledBack();
65+
}
66+
67+
public function isCommitted(): bool
68+
{
69+
return $this->tsx->isCommitted();
70+
}
71+
72+
public function isFinished(): bool
73+
{
74+
return $this->tsx->isFinished();
75+
}
6176
}

0 commit comments

Comments
 (0)