Skip to content

Commit

Permalink
Add Phpdoc to IfNull
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Mar 1, 2024
1 parent 4c3bc12 commit 9056209
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Query/Mysql/IfNull.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@

namespace DoctrineExtensions\Query\Mysql;

use Doctrine\ORM\Query\AST\ArithmeticExpression;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
use Doctrine\ORM\Query\TokenType;

/**
* "IFNULL" "(" ArithmeticExpression "," ArithmeticExpression ")"
* IfNullFunction ::= "IFNULL" "(" ArithmeticExpression "," ArithmeticExpression ")"
*
* @link https://dev.mysql.com/doc/refman/en/flow-control-functions.html#function_ifnull
*
* @author Andrew Mackrodt <andrew@ajmm.org>
*
* @example SELECT IFNULL(null, 2)
* @example SELECT IFNULL(foo.bar, 1) FROM entity
*/
class IfNull extends FunctionNode
{
/** @var ArithmeticExpression */
private $expr1;

/** @var ArithmeticExpression */
private $expr2;

public function parse(Parser $parser): void
Expand Down

0 comments on commit 9056209

Please sign in to comment.