Added declare strict types to all files

This commit is contained in:
Jan Böhmer 2023-06-11 18:59:07 +02:00
parent bea90a7d94
commit 6a2ff9d153
196 changed files with 685 additions and 360 deletions

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -17,7 +20,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Serializer;
use Brick\Math\BigNumber;
@ -49,4 +51,4 @@ class BigNumberNormalizer implements NormalizerInterface
BigNumber::class => true,
];
}
}
}

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -17,7 +20,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Serializer;
use App\Entity\Parts\Part;
@ -180,4 +182,4 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface
Part::class => false,
];
}
}
}

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -17,7 +20,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Serializer;
use App\Entity\Base\AbstractStructuralDBElement;
@ -94,4 +96,4 @@ class StructuralElementDenormalizer implements DenormalizerInterface
AbstractStructuralDBElement::class => false,
];
}
}
}

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -17,7 +20,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Serializer;
use App\Entity\Base\AbstractStructuralDBElement;
@ -74,4 +76,4 @@ class StructuralElementFromNameDenormalizer implements DenormalizerInterface
AbstractStructuralDBElement::class => false
];
}
}
}

View file

@ -1,4 +1,7 @@
<?php
declare(strict_types=1);
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
@ -17,7 +20,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Serializer;
use App\Entity\Base\AbstractStructuralDBElement;
@ -34,8 +36,7 @@ use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
class StructuralElementNormalizer implements NormalizerInterface
{
public function __construct(
#[Autowire(service: ObjectNormalizer::class)]
private NormalizerInterface $normalizer
#[Autowire(service: ObjectNormalizer::class)]private readonly NormalizerInterface $normalizer
)
{
}
@ -69,4 +70,4 @@ class StructuralElementNormalizer implements NormalizerInterface
AbstractStructuralDBElement::class => true,
];
}
}
}