fix: repeat conditions

- remove conditions that are already covered by earlier conditions and thus have no effect.
This commit is contained in:
HDVinnie
2020-12-30 23:01:46 -05:00
parent 90b3880dab
commit bd9d7895bb
4 changed files with 23 additions and 23 deletions
+8 -8
View File
@@ -1236,7 +1236,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1294,7 +1294,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1331,7 +1331,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1376,7 +1376,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1421,7 +1421,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1478,7 +1478,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1559,7 +1559,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';
@@ -1589,7 +1589,7 @@ class UserController extends Controller
if ($request->has('direction') && $request->input('direction') != null) {
$order = $request->input('direction');
}
if (! $sorting || $sorting == null || ! $order || $order == null) {
if (! $sorting || ! $order) {
$sorting = 'created_at';
$order = 'desc';
// $order = 'asc';