Skip to content

Commit

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

namespace DoctrineExtensions\Query\Mysql;

use Doctrine\ORM\Query\AST;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
Expand All @@ -10,12 +11,18 @@
use function sprintf;

/**
* ?
* IfElseFunction ::= "IFELSE" "(" ConditionalExpression "," ArithmeticExpression "," ArithmeticExpression ")"
*
* @link https://dev.mysql.com/doc/refman/en/flow-control-functions.html#function_if
*
* @author Andrew Mackrodt <andrew@ajmm.org>
*
* @example SELECT IFELSE(foo.bar > 2, 1, 0) FROM entity
* @example SELECT IFELSE(true, 0, 1)
*/
class IfElse extends FunctionNode
{
/** @var array<AST\ConditionalExpression|AST\ConditionalFactor|AST\ConditionalPrimary|AST\ConditionalTerm|AST\ArithmeticExpression|null> */
private $expr = [];

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

0 comments on commit 4c3bc12

Please sign in to comment.