Skip to content

Commit f256ec6

Browse files
PratikshaPratiksha
authored andcommitted
Removed the getters from resultCounters
1 parent e5fc522 commit f256ec6

File tree

4 files changed

+20
-92
lines changed

4 files changed

+20
-92
lines changed

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"psr/http-client": "^1.0",
77
"ext-json": "*",
88
"php": "^8.1",
9-
"nyholm/psr7": "^1.8",
109
"php-http/discovery": "^1.17"
1110
},
1211
"require-dev": {
@@ -15,8 +14,7 @@
1514
"friendsofphp/php-cs-fixer": "^3.68",
1615
"vimeo/psalm": "^6.8",
1716
"dg/bypass-finals": "^1.9",
18-
"psalm/plugin-phpunit": "^0.19.2",
19-
"pcov/clobber": "^2.0"
17+
"psalm/plugin-phpunit": "^0.19.2"
2018
},
2119

2220
"autoload": {
@@ -53,7 +51,7 @@
5351
"cs": "vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes",
5452
"cs:fix": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
5553
"psalm": "vendor/bin/psalm --no-cache --show-info=true",
56-
"coverage": "php -dpcov.enabled=1 -dpcov.directory=. vendor/bin/phpunit --coverage-html coverage-report"
54+
"coverage": "php -dpcov.enabled=1 -dpcov.directory=. vendor/bin/phpunit --coverage-html coverage"
5755

5856
}
5957

src/Objects/ResultCounters.php

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -8,96 +8,24 @@
88
class ResultCounters
99
{
1010
public function __construct(
11-
private readonly bool $containsUpdates = false,
12-
private readonly int $nodesCreated = 0,
13-
private readonly int $nodesDeleted = 0,
14-
private readonly int $propertiesSet = 0,
15-
private readonly int $relationshipsCreated = 0,
16-
private readonly int $relationshipsDeleted = 0,
17-
private readonly int $labelsAdded = 0,
18-
private readonly int $labelsRemoved = 0,
19-
private readonly int $indexesAdded = 0,
20-
private readonly int $indexesRemoved = 0,
21-
private readonly int $constraintsAdded = 0,
22-
private readonly int $constraintsRemoved = 0,
23-
private readonly bool $containsSystemUpdates = false,
24-
private readonly int $systemUpdates = 0
11+
public readonly bool $containsUpdates = false,
12+
public readonly int $nodesCreated = 0,
13+
public readonly int $nodesDeleted = 0,
14+
public readonly int $propertiesSet = 0,
15+
public readonly int $relationshipsCreated = 0,
16+
public readonly int $relationshipsDeleted = 0,
17+
public readonly int $labelsAdded = 0,
18+
public readonly int $labelsRemoved = 0,
19+
public readonly int $indexesAdded = 0,
20+
public readonly int $indexesRemoved = 0,
21+
public readonly int $constraintsAdded = 0,
22+
public readonly int $constraintsRemoved = 0,
23+
public readonly bool $containsSystemUpdates = false,
24+
public readonly int $systemUpdates = 0
2525
) {
2626
}
2727

2828

2929

3030

31-
public function ContainsSystemUpdates(): bool
32-
{
33-
return $this->containsSystemUpdates;
34-
}
35-
36-
37-
public function containsUpdates(): bool
38-
{
39-
return $this->containsUpdates;
40-
}
41-
42-
public function getNodesCreated(): int
43-
{
44-
return $this->nodesCreated;
45-
}
46-
47-
48-
public function getNodesDeleted(): int
49-
{
50-
return $this->nodesDeleted;
51-
}
52-
53-
54-
public function getPropertiesSet(): int
55-
{
56-
return $this->propertiesSet;
57-
}
58-
59-
public function getRelationshipsCreated(): int
60-
{
61-
return $this->relationshipsCreated;
62-
}
63-
64-
public function getRelationshipsDeleted(): int
65-
{
66-
return $this->relationshipsDeleted;
67-
}
68-
69-
public function getLabelsAdded(): int
70-
{
71-
return $this->labelsAdded;
72-
}
73-
74-
public function getIndexesAdded(): int
75-
{
76-
return $this->indexesAdded;
77-
}
78-
79-
public function getIndexesRemoved(): int
80-
{
81-
return $this->indexesRemoved;
82-
}
83-
84-
public function getConstraintsAdded(): int
85-
{
86-
return $this->constraintsAdded;
87-
}
88-
89-
public function getConstraintsRemoved(): int
90-
{
91-
return $this->constraintsRemoved;
92-
}
93-
94-
public function getSystemUpdates(): int
95-
{
96-
return $this->systemUpdates;
97-
}
98-
99-
public function getLabelsRemoved(): int
100-
{
101-
return $this->labelsRemoved;
102-
}
10331
}

tests/Integration/Neo4jQueryAPIIntegrationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use GuzzleHttp\Client;
66
use GuzzleHttp\Handler\MockHandler;
77
use GuzzleHttp\HandlerStack;
8+
use Http\Discovery\Psr17Factory;
89
use Neo4j\QueryAPI\Exception\Neo4jException;
910
use Neo4j\QueryAPI\Neo4jQueryAPI;
1011
use Neo4j\QueryAPI\Neo4jRequestFactory;
@@ -17,7 +18,7 @@
1718
use Neo4j\QueryAPI\OGM;
1819
use Neo4j\QueryAPI\Results\ResultRow;
1920
use Neo4j\QueryAPI\Results\ResultSet;
20-
use Nyholm\Psr7\Factory\Psr17Factory;
21+
2122
use PHPUnit\Framework\TestCase;
2223
use Neo4j\QueryAPI\Enums\AccessMode;
2324
use Neo4j\QueryAPI\ResponseParser;

tests/Unit/Neo4jQueryAPIUnitTest.php

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

55
use GuzzleHttp\Handler\MockHandler;
66
use GuzzleHttp\HandlerStack;
7+
use GuzzleHttp\Psr7\Response;
78
use http\Client;
89
use Http\Discovery\Psr17FactoryDiscovery;
910
use Neo4j\QueryAPI\Neo4jQueryAPI;
@@ -19,7 +20,7 @@
1920
use Psr\Http\Message\StreamInterface;
2021
use RuntimeException;
2122
use Neo4j\QueryAPI\Configuration;
22-
use Nyholm\Psr7\Response;
23+
2324

2425
/**
2526
* @api

0 commit comments

Comments
 (0)