Skip to content

Commit

Permalink
Apply CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyslik committed Mar 12, 2017
1 parent 7c47f1c commit 96dc350
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ColumnSortable/ColumnSortableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function boot()
__DIR__ . '/../config/columnsortable.php' => config_path('columnsortable.php')
], 'config');

Blade::directive('sortablelink', function ($expression) {
Blade::directive('sortablelink', function($expression) {
$expression = ($expression[0] === '(') ? substr($expression, 1, -1) : $expression;
return "<?php echo \Kyslik\ColumnSortable\SortableLink::render(array ({$expression}));?>";
});
Expand Down
6 changes: 2 additions & 4 deletions src/ColumnSortable/Sortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ private function queryJoinBuilder($query, $relation)
*/
private function columnExists($model, $column)
{
return (isset($model->sortable)) ? in_array($column, $model->sortable) :
Schema::hasColumn($model->getTable(), $column);
return (isset($model->sortable)) ? in_array($column, $model->sortable) : Schema::hasColumn($model->getTable(), $column);
}

/**
Expand All @@ -165,7 +164,6 @@ private function formatToSortParameters($sort)
reset($sort);
$each = each($sort);

return ($each[0] === 0) ? ['sort' => $each[1], 'order' => $configDefaultOrder] :
['sort' => $each[0], 'order' => $each[1]];
return ($each[0] === 0) ? ['sort' => $each[1], 'order' => $configDefaultOrder] : ['sort' => $each[0], 'order' => $each[1]];
}
}

0 comments on commit 96dc350

Please sign in to comment.