mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Serializer\APIPlatform;
|
||||
|
||||
use ApiPlatform\Metadata\Exception\ResourceClassNotFoundException;
|
||||
use ApiPlatform\Api\IriConverterInterface;
|
||||
use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\Metadata\Post;
|
||||
|
@ -59,7 +60,7 @@ class DetermineTypeFromElementIRIDenormalizer implements DenormalizerInterface,
|
|||
* @param array $input
|
||||
* @param Operation $operation
|
||||
* @return array
|
||||
* @throws \ApiPlatform\Metadata\Exception\ResourceClassNotFoundException
|
||||
* @throws ResourceClassNotFoundException
|
||||
*/
|
||||
private function addTypeDiscriminatorIfNecessary(array $input, Operation $operation): array
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm
|
|||
if (isset($data['supplier']) && $data['supplier'] !== "") {
|
||||
$supplier = $this->locationDenormalizer->denormalize($data['supplier'], Supplier::class, $format, $context);
|
||||
|
||||
if ($supplier) {
|
||||
if ($supplier !== null) {
|
||||
$orderdetail = new Orderdetail();
|
||||
$orderdetail->setSupplier($supplier);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue