Skip to content

Commit 8a34413

Browse files
PHP 8.0
1 parent 392e5c2 commit 8a34413

File tree

5 files changed

+168
-23
lines changed

5 files changed

+168
-23
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
"FamilyTree365\\LaravelGedcom\\ServiceProvider"
1919
]
2020
}
21+
},
22+
"require-dev": {
23+
"rector/rector": "^0.11.49"
2124
}
2225
}

composer.lock

Lines changed: 137 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rector.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Core\Configuration\Option;
6+
use Rector\Php74\Rector\Property\TypedPropertyRector;
7+
use Rector\Set\ValueObject\SetList;
8+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
9+
10+
return static function (ContainerConfigurator $containerConfigurator): void {
11+
$containerConfigurator->import(SetList::PHP_80);
12+
// get parameters
13+
$parameters = $containerConfigurator->parameters();
14+
15+
// Define what rule sets will be applied
16+
$containerConfigurator->import(SetList::DEAD_CODE);
17+
18+
// get services (needed for register a single rule)
19+
// $services = $containerConfigurator->services();
20+
21+
// register a single rule
22+
// $services->set(TypedPropertyRector::class);
23+
};

src/Utils/DateParser.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
class DateParser
66
{
7-
private $date_string;
8-
private $year = null;
9-
private $month = null;
10-
private $day = null;
7+
private $year;
8+
private $month;
9+
private $day;
1110

12-
public function __construct($date_string = '')
11+
public function __construct(private $date_string = '')
1312
{
14-
$this->date_string = $date_string;
1513
}
1614

1715
public function parse_date()

src/Utils/Importer/Phon.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public static function read($conn, $phon)
1919
}
2020
} else {
2121
if (is_array($phon)) {
22-
$ret = '';
23-
$ret = json_encode($phon);
24-
25-
return $ret;
22+
return json_encode($phon);
2623
} else {
2724
return "$phon";
2825
}

0 commit comments

Comments
 (0)