Fixed static analysis issues.

This commit is contained in:
Jan Böhmer 2023-01-08 18:30:41 +01:00
parent e679317b4b
commit 257c67b6c1
4 changed files with 6 additions and 5 deletions

View file

@ -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 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; return $redirectResponse;
} }

View file

@ -66,13 +66,14 @@ class EntityColumn extends AbstractColumn
$resolver->setDefault('render', function (Options $options) { $resolver->setDefault('render', function (Options $options) {
return function ($value, $context) use ($options) { return function ($value, $context) use ($options) {
/** @var AbstractNamedDBElement|null $entity */
if ($this->accessor->isReadable($context, $options['property'])) { if ($this->accessor->isReadable($context, $options['property'])) {
$entity = $this->accessor->getValue($context, $options['property']); $entity = $this->accessor->getValue($context, $options['property']);
} else { } else {
$entity = null; $entity = null;
} }
/** @var AbstractNamedDBElement|null $entity */
if (null !== $entity) { if (null !== $entity) {
if (null !== $entity->getID()) { if (null !== $entity->getID()) {
return sprintf( return sprintf(

View file

@ -48,7 +48,7 @@ class ProjectBOMEntry extends AbstractDBElement
use TimestampTrait; use TimestampTrait;
/** /**
* @var int * @var float
* @ORM\Column(type="float", name="quantity") * @ORM\Column(type="float", name="quantity")
* @Assert\Positive() * @Assert\Positive()
*/ */

View file

@ -131,10 +131,10 @@ final class PartsTableActionHandler
default: default:
throw new InvalidArgumentException('The given action is unknown! ('.$action.')'); throw new InvalidArgumentException('The given action is unknown! ('.$action.')');
} }
}
return null; return null;
} }
}
/** /**
* Throws an exception unless the attributes are granted against the current authentication token and optionally * Throws an exception unless the attributes are granted against the current authentication token and optionally