mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -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';
|
||||
|
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user