Skip to content

Commit

Permalink
Add Phpdoc to FromUnixtime
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Mar 1, 2024
1 parent b8dfc5d commit d563c35
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Query/Mysql/FromUnixtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@
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;

/**
* "FROM_UNIXTIME" "(" ArithmeticPrimary ["," ArithmeticPrimary] ")"
* FromUnixTimeFunction ::= "FROM_UNIXTIME" "(" ArithmeticPrimary ["," ArithmeticPrimary] ")"
*
* @link https://dev.mysql.com/doc/refman/en/date-and-time-functions.html#function_from-unixtime
*
* @author Nima S <nimasdj@yahoo.com>
* @example SELECT FROM_UNIXTIME(123456789)
* @example SELECT FROM_UNIXTIME(foo.bar, "%Y") FROM entity
*/
class FromUnixtime extends FunctionNode
{
/** @var Node|string */
public $firstExpression = null;

/** @var Node|string */
public $secondExpression = null;

public function getSql(SqlWalker $sqlWalker): string
Expand Down

0 comments on commit d563c35

Please sign in to comment.