mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +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\OrderBy({"name" = "ASC"})
|
||||
* @var Collection
|
||||
*/
|
||||
protected $children;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ use Twig\TwigFunction;
|
|||
|
||||
class LastUserExtension extends AbstractExtension
|
||||
{
|
||||
/** @var \App\Repository\LogEntryRepository */
|
||||
private $repo;
|
||||
|
||||
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
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue