|
@@ 59-62 (lines=4) @@
|
| 56 |
|
throw new \RuntimeException('Invalid type'); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
if (false == in_array($sort, array('created', 'updated', 'pushed', 'full_name'))) |
| 60 |
|
{ |
| 61 |
|
throw new \RuntimeException('Invalid sort field'); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
// Sort direction default: when using full_name: asc, otherwise desc. |
| 65 |
|
$direction = ($direction) ? : (('full_name' == $sort) ? 'asc' : 'desc'); |
|
@@ 106-109 (lines=4) @@
|
| 103 |
|
throw new \RuntimeException('Invalid type'); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
if (false == in_array($sort, array('created', 'updated', 'pushed', 'full_name'))) |
| 107 |
|
{ |
| 108 |
|
throw new \RuntimeException('Invalid sort field'); |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
// Sort direction default: when using full_name: asc, otherwise desc. |
| 112 |
|
$direction = ($direction) ? : (('full_name' == $sort) ? 'asc' : 'desc'); |