* added doctrine listener to calculate duration on each update #31 * added constraints to base objects #31 * new form to create timesheet entries #31 * added unit test for TimesheetVoter #31
This commit is contained in:
@@ -19,6 +19,9 @@ namespace AppBundle\Repository\Query;
|
||||
class BaseQuery
|
||||
{
|
||||
|
||||
const ORDER_ASC = 'ASC';
|
||||
const ORDER_DESC = 'DESC';
|
||||
|
||||
const DEFAULT_PAGESIZE = 25;
|
||||
const DEFAULT_PAGE = 1;
|
||||
|
||||
@@ -118,7 +121,7 @@ class BaseQuery
|
||||
*/
|
||||
public function setOrder($order)
|
||||
{
|
||||
if (in_array($order, ['ASC', 'DESC'])) {
|
||||
if (in_array($order, [self::ORDER_ASC, self::ORDER_DESC])) {
|
||||
$this->order = $order;
|
||||
}
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user