diff --git a/src/Controller/PartListsController.php b/src/Controller/PartListsController.php index 6a59f817..2d2c4b3e 100644 --- a/src/Controller/PartListsController.php +++ b/src/Controller/PartListsController.php @@ -86,7 +86,7 @@ class PartListsController extends AbstractController } //If the action handler returned a response, we use it, otherwise we redirect back to the previous page. - if ($redirectResponse){ + if (isset($redirectResponse) && $redirectResponse instanceof Response) { return $redirectResponse; } diff --git a/src/DataTables/Column/EntityColumn.php b/src/DataTables/Column/EntityColumn.php index 9fa5d422..d48d6da1 100644 --- a/src/DataTables/Column/EntityColumn.php +++ b/src/DataTables/Column/EntityColumn.php @@ -66,13 +66,14 @@ class EntityColumn extends AbstractColumn $resolver->setDefault('render', function (Options $options) { return function ($value, $context) use ($options) { - /** @var AbstractNamedDBElement|null $entity */ if ($this->accessor->isReadable($context, $options['property'])) { $entity = $this->accessor->getValue($context, $options['property']); } else { $entity = null; } + /** @var AbstractNamedDBElement|null $entity */ + if (null !== $entity) { if (null !== $entity->getID()) { return sprintf( diff --git a/src/Entity/ProjectSystem/ProjectBOMEntry.php b/src/Entity/ProjectSystem/ProjectBOMEntry.php index 12dde6bd..3c874a7b 100644 --- a/src/Entity/ProjectSystem/ProjectBOMEntry.php +++ b/src/Entity/ProjectSystem/ProjectBOMEntry.php @@ -48,7 +48,7 @@ class ProjectBOMEntry extends AbstractDBElement use TimestampTrait; /** - * @var int + * @var float * @ORM\Column(type="float", name="quantity") * @Assert\Positive() */ diff --git a/src/Services/Parts/PartsTableActionHandler.php b/src/Services/Parts/PartsTableActionHandler.php index bd57282f..2fde40b2 100644 --- a/src/Services/Parts/PartsTableActionHandler.php +++ b/src/Services/Parts/PartsTableActionHandler.php @@ -131,9 +131,9 @@ final class PartsTableActionHandler default: throw new InvalidArgumentException('The given action is unknown! ('.$action.')'); } - - return null; } + + return null; } /**