Fixed more PHPstan warnings.

This commit is contained in:
Jan Böhmer 2022-03-04 18:37:42 +01:00
parent 775a223ab2
commit 61bd0bd15c
4 changed files with 4 additions and 2 deletions

View file

@ -72,6 +72,7 @@ class Supplier extends AbstractCompany
/**
* @ORM\OneToMany(targetEntity="Supplier", mappedBy="parent")
* @ORM\OrderBy({"name" = "ASC"})
* @var Collection
*/
protected $children;

View file

@ -106,7 +106,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
{
if ($user instanceof User) {
$user->setPassword($newEncodedPassword);
$this->getEntityManager()->flush($user);
$this->getEntityManager()->flush();
}
}
}

View file

@ -30,6 +30,7 @@ use Twig\TwigFunction;
class LastUserExtension extends AbstractExtension
{
/** @var \App\Repository\LogEntryRepository */
private $repo;
public function __construct(EntityManagerInterface $em)

View file

@ -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
$tmp = explode('/', $value);
//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;
}