Skip to content

Commit

Permalink
Fix wrong types (#9802)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire authored Jun 1, 2022
1 parent 48e4e33 commit 2197647
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ public function getQueryCacheDriver(): ?Cache
/**
* Defines how long the query cache will be active before expire.
*
* @param int $timeToLive How long the cache entry is valid.
* @param int|null $timeToLive How long the cache entry is valid.
*
* @return $this
*/
Expand Down
10 changes: 1 addition & 9 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1395,20 +1395,12 @@
<PossiblyNullArgument occurrences="1">
<code>$this-&gt;getDQL()</code>
</PossiblyNullArgument>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$timeToLive</code>
</PossiblyNullPropertyAssignmentValue>
<PossiblyNullReference occurrences="1">
<code>evictEntityRegion</code>
</PossiblyNullReference>
<PropertyNotSetInConstructor occurrences="2">
<PropertyNotSetInConstructor occurrences="1">
<code>$parserResult</code>
<code>$queryCacheTTL</code>
</PropertyNotSetInConstructor>
<RedundantConditionGivenDocblockType occurrences="2">
<code>$dqlQuery !== null</code>
<code>$timeToLive !== null</code>
</RedundantConditionGivenDocblockType>
</file>
<file src="lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php">
<ParamNameMismatch occurrences="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class ManyToOneOrphanRemovalTest extends OrmFunctionalTestCase
{
/** @var int */
/** @var string */
private $personId;

/** @var array<string, list<class-string>> */
Expand Down
3 changes: 2 additions & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
Expand Down Expand Up @@ -167,7 +168,7 @@ class DDC1430Order

/**
* @OneToMany(targetEntity="DDC1430OrderProduct", mappedBy="order", cascade={"persist", "remove"})
* @var ArrayCollection $products
* @var Collection $products
*/
private $products;

Expand Down
3 changes: 1 addition & 2 deletions tests/Doctrine/Tests/ORM/Mapping/AnsiQuoteStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\ORM\Mapping\AnsiQuoteStrategy;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\DefaultQuoteStrategy;
use Doctrine\Persistence\Mapping\RuntimeReflectionService;
use Doctrine\Tests\Models\CMS\CmsAddress;
use Doctrine\Tests\Models\CMS\CmsUser;
Expand All @@ -21,7 +20,7 @@
*/
class AnsiQuoteStrategyTest extends OrmTestCase
{
/** @var DefaultQuoteStrategy */
/** @var AnsiQuoteStrategy */
private $strategy;

/** @var AbstractPlatform */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Doctrine\Tests\ORM\Tools\Console\Command;

use Doctrine\ORM\Tools\Console\Command\InfoCommand;
use Doctrine\ORM\Tools\Console\Command\MappingDescribeCommand;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
use Doctrine\Tests\Models\Cache\AttractionInfo;
Expand All @@ -22,7 +21,7 @@ class MappingDescribeCommandTest extends OrmFunctionalTestCase
/** @var Application */
private $application;

/** @var InfoCommand */
/** @var MappingDescribeCommand */
private $command;

/** @var CommandTester */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Doctrine\Tests\ORM\Tools\Console\Command;

use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\ORM\Tools\Console\Command\InfoCommand;
use Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;
use Doctrine\Tests\OrmFunctionalTestCase;
Expand All @@ -20,7 +19,7 @@
*/
class ValidateSchemaCommandTest extends OrmFunctionalTestCase
{
/** @var InfoCommand */
/** @var ValidateSchemaCommand */
private $command;

/** @var CommandTester */
Expand Down

0 comments on commit 2197647

Please sign in to comment.