mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed more PHPstan warnings.
This commit is contained in:
parent
775a223ab2
commit
61bd0bd15c
4 changed files with 4 additions and 2 deletions
|
@ -72,6 +72,7 @@ class Supplier extends AbstractCompany
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="Supplier", mappedBy="parent")
|
* @ORM\OneToMany(targetEntity="Supplier", mappedBy="parent")
|
||||||
* @ORM\OrderBy({"name" = "ASC"})
|
* @ORM\OrderBy({"name" = "ASC"})
|
||||||
|
* @var Collection
|
||||||
*/
|
*/
|
||||||
protected $children;
|
protected $children;
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
|
||||||
{
|
{
|
||||||
if ($user instanceof User) {
|
if ($user instanceof User) {
|
||||||
$user->setPassword($newEncodedPassword);
|
$user->setPassword($newEncodedPassword);
|
||||||
$this->getEntityManager()->flush($user);
|
$this->getEntityManager()->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ use Twig\TwigFunction;
|
||||||
|
|
||||||
class LastUserExtension extends AbstractExtension
|
class LastUserExtension extends AbstractExtension
|
||||||
{
|
{
|
||||||
|
/** @var \App\Repository\LogEntryRepository */
|
||||||
private $repo;
|
private $repo;
|
||||||
|
|
||||||
public function __construct(EntityManagerInterface $em)
|
public function __construct(EntityManagerInterface $em)
|
||||||
|
|
|
@ -74,7 +74,7 @@ class UrlOrBuiltinValidator extends UrlValidator
|
||||||
//After the %PLACEHOLDER% comes a slash, so we can check if we have a placholder via explode
|
//After the %PLACEHOLDER% comes a slash, so we can check if we have a placholder via explode
|
||||||
$tmp = explode('/', $value);
|
$tmp = explode('/', $value);
|
||||||
//Builtins must have a %PLACEHOLDER% construction
|
//Builtins must have a %PLACEHOLDER% construction
|
||||||
if (!empty($tmp) && \in_array($tmp[0], $constraint->allowed_placeholders, false)) {
|
if (\in_array($tmp[0], $constraint->allowed_placeholders, false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue