mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 18:03:37 +02:00
Fixed static analysis issues.
This commit is contained in:
parent
e679317b4b
commit
257c67b6c1
4 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -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()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -131,9 +131,9 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue