Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
DariusIII
2018-05-10 12:16:40 +00:00
committed by StyleCI Bot
parent f251177382
commit b66b72f149
2 changed files with 4 additions and 12 deletions
+2 -9
View File
@@ -3,8 +3,8 @@
namespace App\Models;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Model;
use Watson\Rememberable\Rememberable;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
@@ -173,8 +173,6 @@ class Category extends Model
*/
public static function getRecentlyAdded()
{
return self::query()
->remember(config('nntmux.cache_expiry_long'))
->where('r.adddate', '>', Carbon::now()->subWeek())
@@ -339,9 +337,7 @@ class Category extends Model
public static function getByIds($ids)
{
if (\count($ids) > 0) {
return self::query()->remember(config('nntmux.cache_expiry_long'))->whereIn('id', $ids)->get();
}
return false;
@@ -419,10 +415,7 @@ class Category extends Model
$sql->whereNotIn('id', $roleExcludedCats);
}
$arr = $sql->get()->toArray();
$arr = $sql->get()->toArray();
foreach ($arr as $key => $val) {
if ($val['id'] === self::OTHER_ROOT) {
+2 -3
View File
@@ -6,8 +6,8 @@ use Blacklight\ColorCLI;
use Blacklight\ConsoleTools;
use Laravel\Scout\Searchable;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Model;
use Watson\Rememberable\Rememberable;
use Illuminate\Database\Eloquent\Model;
/**
* @property mixed $release
@@ -163,8 +163,7 @@ class Predb extends Model
});
}
return $sql->paginate(config('nntmux.items_per_page'));
return $sql->paginate(config('nntmux.items_per_page'));
}
/**