@@ -26,6 +26,10 @@ discard block |
||
| 26 | 26 | private $function; |
| 27 | 27 | private $field; |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @param string $function |
|
| 31 | + * @param string $field |
|
| 32 | + */ |
|
| 29 | 33 | public function __construct($function, $field) |
| 30 | 34 | { |
| 31 | 35 | $this->function = $function; |
@@ -171,6 +175,9 @@ discard block |
||
| 171 | 175 | private $from; |
| 172 | 176 | private $to; |
| 173 | 177 | |
| 178 | + /** |
|
| 179 | + * @param string $field |
|
| 180 | + */ |
|
| 174 | 181 | public function __construct($field, $from, $to) |
| 175 | 182 | { |
| 176 | 183 | $this->field = $field; |
@@ -93,15 +93,15 @@ |
||
| 93 | 93 | $value === null ? |
| 94 | 94 | sprintf( |
| 95 | 95 | 'expected %s', |
| 96 | - implode('|', array_map(function ($type) { |
|
| 96 | + implode('|', array_map(function($type) { |
|
| 97 | 97 | return Token::getTypeName($type); |
| 98 | 98 | }, (array)$type)) |
| 99 | 99 | ) : |
| 100 | 100 | sprintf('expected %s (%s)', |
| 101 | - implode('|', array_map(function ($value) { |
|
| 101 | + implode('|', array_map(function($value) { |
|
| 102 | 102 | return '"' . $value . '"'; |
| 103 | 103 | }, (array)$type)), |
| 104 | - implode('|', array_map(function ($type) { |
|
| 104 | + implode('|', array_map(function($type) { |
|
| 105 | 105 | return Token::getTypeName($type); |
| 106 | 106 | }, (array)$type)) |
| 107 | 107 | ) |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | do { |
| 24 | 24 | $direction = $tokenStream->expect([Token::T_PLUS, Token::T_MINUS]); |
| 25 | 25 | $fields[$tokenStream->expect(Token::T_STRING)->getValue()] = $direction->test(Token::T_PLUS) ? |
| 26 | - SortNode::SORT_ASC : |
|
| 27 | - SortNode::SORT_DESC; |
|
| 26 | + SortNode::SORT_ASC : SortNode::SORT_DESC; |
|
| 28 | 27 | |
| 29 | 28 | if (!$tokenStream->nextIf(Token::T_COMMA)) { |
| 30 | 29 | break; |