Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken type annotations #441

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading