Remove static references

This commit is contained in:
James Cole
2023-10-29 06:32:00 +01:00
parent e65d0eef6e
commit 075d459b7c
128 changed files with 391 additions and 391 deletions

View File

@@ -69,7 +69,7 @@ class AccountList implements BinderInterface
return $collection;
}
}
Log::error(sprintf('Trying to show account list (%s), but user is not logged in or list is empty.', $route->uri));
app('log')->error(sprintf('Trying to show account list (%s), but user is not logged in or list is empty.', $route->uri));
throw new NotFoundHttpException();
}
}

View File

@@ -60,7 +60,7 @@ class CLIToken implements BinderInterface
return $value;
}
}
Log::error(sprintf('Recognized no users by access token "%s"', $value));
app('log')->error(sprintf('Recognized no users by access token "%s"', $value));
throw new NotFoundHttpException();
}
}

View File

@@ -74,7 +74,7 @@ class Date implements BinderInterface
$result = new Carbon($value);
} catch (InvalidDateException $e) {
$message = sprintf('Could not parse date "%s" for user #%d: %s', $value, auth()->user()->id, $e->getMessage());
Log::error($message);
app('log')->error($message);
throw new NotFoundHttpException($message, $e);
}

View File

@@ -54,7 +54,7 @@ class TagList implements BinderInterface
Log::debug('List of tags is', $list);
if (0 === count($list)) {
Log::error('Tag list is empty.');
app('log')->error('Tag list is empty.');
throw new NotFoundHttpException();
}
@@ -81,7 +81,7 @@ class TagList implements BinderInterface
return $collection;
}
}
Log::error('TagList: user is not logged in.');
app('log')->error('TagList: user is not logged in.');
throw new NotFoundHttpException();
}
}

View File

@@ -54,10 +54,10 @@ class TagOrId implements BinderInterface
if (null !== $result) {
return $result;
}
Log::error('TagOrId: tag not found.');
app('log')->error('TagOrId: tag not found.');
throw new NotFoundHttpException();
}
Log::error('TagOrId: user is not logged in.');
app('log')->error('TagOrId: user is not logged in.');
throw new NotFoundHttpException();
}
}