Skip to content

Commit

Permalink
Fix broken type annotations (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Mar 1, 2024
1 parent c1b03d3 commit 808cb4a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
20 changes: 0 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Property DoctrineExtensions\\\\Query\\\\Mysql\\\\Collate\\:\\:\\$collation \\(null\\) does not accept string\\.$#"
count: 1
path: src/Query/Mysql/Collate.php

-
message: "#^Property DoctrineExtensions\\\\Query\\\\Mysql\\\\Collate\\:\\:\\$stringPrimary \\(null\\) does not accept Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\.$#"
count: 1
path: src/Query/Mysql/Collate.php

-
message: "#^Property DoctrineExtensions\\\\Query\\\\Mysql\\\\Lag\\:\\:\\$aggregateExpression \\(Doctrine\\\\ORM\\\\Query\\\\AST\\\\AggregateExpression\\) does not accept Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\|string\\.$#"
count: 1
Expand Down Expand Up @@ -49,13 +39,3 @@ parameters:
message: "#^Property DoctrineExtensions\\\\Query\\\\Mysql\\\\Variance\\:\\:\\$arithmeticExpression \\(Doctrine\\\\ORM\\\\Query\\\\AST\\\\SimpleArithmeticExpression\\) does not accept Doctrine\\\\ORM\\\\Query\\\\AST\\\\Node\\|string\\.$#"
count: 1
path: src/Query/Mysql/Variance.php

-
message: "#^PHPDoc tag @return with type array\\|string is not subtype of native type string\\.$#"
count: 1
path: src/Query/MysqlWalker.php

-
message: "#^Property DoctrineExtensions\\\\Query\\\\Sqlite\\\\Week\\:\\:\\$mode \\(int\\) does not accept Doctrine\\\\ORM\\\\Query\\\\AST\\\\Literal\\.$#"
count: 1
path: src/Query/Sqlite/Week.php
5 changes: 3 additions & 2 deletions src/Query/Mysql/Collate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace DoctrineExtensions\Query\Mysql;

use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;
Expand All @@ -16,10 +17,10 @@
*/
class Collate extends FunctionNode
{
/** @var null */
/** @var Node|null */
public $stringPrimary = null;

/** @var null */
/** @var string|null */
public $collation = null;

public function parse(Parser $parser): void
Expand Down
6 changes: 1 addition & 5 deletions src/Query/MysqlWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@

class MysqlWalker extends SqlWalker
{
/**
* @return array|string
*
* @inheritdoc
*/
/** @inheritdoc */
public function walkSelectClause($selectClause): string
{
$sql = parent::walkSelectClause($selectClause);
Expand Down
3 changes: 2 additions & 1 deletion src/Query/Sqlite/Week.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DoctrineExtensions\Query\Sqlite;

use Doctrine\ORM\Query\AST\Literal;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\TokenType;

Expand All @@ -11,7 +12,7 @@ class Week extends NumberFromStrfTime
/**
* Currently not in use
*
* @var int
* @var Literal
*/
public $mode;

Expand Down

0 comments on commit 808cb4a

Please sign in to comment.