Code optimalisations.

This commit is contained in:
James Cole
2018-07-05 21:18:53 +02:00
parent 1675a0d442
commit c99b7e927d
26 changed files with 216 additions and 150 deletions

View File

@@ -66,7 +66,7 @@ class Controller extends BaseController
$return = '?';
$params = [];
foreach ($this->parameters as $key => $value) {
if ($key === 'page') {
if ('page' === $key) {
continue;
}
if ($value instanceof Carbon) {
@@ -88,7 +88,7 @@ class Controller extends BaseController
{
$bag = new ParameterBag;
$page = (int)request()->get('page');
if ($page === 0) {
if (0 === $page) {
$page = 1;
}
$bag->set('page', $page);