apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Security\Core\Security;
class TrackCreateUpdateSubscriber implements EventSubscriber
{
public function __construct(private Security $security)
public function __construct(private readonly Security $security)
{
}

View File

@@ -20,7 +20,7 @@ class Point implements JsonSerializable
{
public static string $SRID = '4326';
private function __construct(private ?float $lon, private ?float $lat)
private function __construct(private readonly ?float $lon, private readonly ?float $lat)
{
}

View File

@@ -29,7 +29,7 @@ use function reset;
*/
class NativeDateIntervalType extends DateIntervalType
{
public const FORMAT = '%rP%YY%MM%DDT%HH%IM%SS';
final public const FORMAT = '%rP%YY%MM%DDT%HH%IM%SS';
public function convertToDatabaseValue($value, AbstractPlatform $platform)
{
@@ -51,7 +51,7 @@ class NativeDateIntervalType extends DateIntervalType
}
try {
$strings = explode(' ', $value);
$strings = explode(' ', (string) $value);
if (count($strings) === 0) {
return null;
@@ -101,8 +101,8 @@ class NativeDateIntervalType extends DateIntervalType
return $current . $unit;
}
if (preg_match('/([0-9]{2}\:[0-9]{2}:[0-9]{2})/', $current) === 1) {
$tExploded = explode(':', $current);
if (preg_match('/([0-9]{2}\:[0-9]{2}:[0-9]{2})/', (string) $current) === 1) {
$tExploded = explode(':', (string) $current);
$intervalSpec = 'T';
$intervalSpec .= $tExploded[0] . 'H';
$intervalSpec .= $tExploded[1] . 'M';

View File

@@ -21,7 +21,7 @@ use Doctrine\DBAL\Types\Type;
*/
class PointType extends Type
{
public const POINT = 'point';
final public const POINT = 'point';
public function canRequireSQLConversion()
{