Skip to content

Commit 8331493

Browse files
authored
Merge pull request #1594 from scyzoryck/fix-rector-ci
Fix rector config
2 parents 176e822 + e167d4f commit 8331493

File tree

7 files changed

+12
-13
lines changed

7 files changed

+12
-13
lines changed

.github/workflows/static-analysis.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- "8.0"
2020
- "8.1"
2121
- "8.2"
22+
- "8.3"
23+
- "8.4"
2224

2325
steps:
2426
- name: "Checkout code"
@@ -42,4 +44,4 @@ jobs:
4244

4345
- name: "Run a static analysis with rector/rector"
4446
run: "vendor/bin/rector --dry-run"
45-
if: ${{ matrix.php-version == 8.2 }}
47+
if: ${{ matrix.php-version == 8.4 }}

rector.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Set\ValueObject\LevelSetList;
76

8-
return static function (RectorConfig $rectorConfig) {
9-
$rectorConfig->paths([
10-
__DIR__ . '/src',
11-
]);
12-
$rectorConfig->phpVersion(74);
13-
};
7+
return RectorConfig::configure()->withPaths([
8+
__DIR__ . '/src',
9+
])
10+
->withPhp74Sets();

src/AbstractVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
abstract class AbstractVisitor implements VisitorInterface
1515
{
1616
/**
17-
* @var GraphNavigatorInterface
17+
* @var GraphNavigatorInterface|null
1818
*/
1919
protected $navigator;
2020

src/JsonDeserializationVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function endVisitingObject(ClassMetadata $metadata, $data, array $type):
204204
*/
205205
public function getResult($data)
206206
{
207-
unset($this->navigator);
207+
$this->navigator = null;
208208

209209
return $data;
210210
}

src/JsonSerializationVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function setData(string $key, $value): void
190190
*/
191191
public function getResult($data)
192192
{
193-
unset($this->navigator);
193+
$this->navigator = null;
194194

195195
$result = @json_encode($data, $this->options);
196196

src/XmlDeserializationVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public function revertCurrentMetadata()
449449
*/
450450
public function getResult($data)
451451
{
452-
unset($this->navigator);
452+
$this->navigator = null;
453453

454454
return $data;
455455
}

src/XmlSerializationVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public function endVisitingObject(ClassMetadata $metadata, object $data, array $
383383
*/
384384
public function getResult($node)
385385
{
386-
unset($this->navigator);
386+
$this->navigator = null;
387387
if (null === $this->document->documentElement) {
388388
if ($node instanceof \DOMElement) {
389389
$this->document->appendChild($node);

0 commit comments

Comments
 (0)