Remove static references

This commit is contained in:
James Cole
2023-10-29 06:33:43 +01:00
parent 075d459b7c
commit 4f2159b54d
205 changed files with 1287 additions and 1287 deletions

View File

@@ -46,12 +46,12 @@ class IntroController extends Controller
*/
public function getIntroSteps(string $route, string $specificPage = null): JsonResponse
{
Log::debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage));
app('log')->debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage));
$specificPage = $specificPage ?? '';
$steps = $this->getBasicSteps($route);
$specificSteps = $this->getSpecificSteps($route, $specificPage);
if (0 === count($specificSteps)) {
Log::debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage));
app('log')->debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage));
return response()->json($steps);
}
@@ -81,7 +81,7 @@ class IntroController extends Controller
public function hasOutroStep(string $route): bool
{
$routeKey = str_replace('.', '_', $route);
Log::debug(sprintf('Has outro step for route %s', $routeKey));
app('log')->debug(sprintf('Has outro step for route %s', $routeKey));
$elements = config(sprintf('intro.%s', $routeKey));
if (!is_array($elements)) {
return false;
@@ -89,9 +89,9 @@ class IntroController extends Controller
$hasStep = array_key_exists('outro', $elements);
Log::debug('Elements is array', $elements);
Log::debug('Keys is', array_keys($elements));
Log::debug(sprintf('Keys has "outro": %s', var_export($hasStep, true)));
app('log')->debug('Elements is array', $elements);
app('log')->debug('Keys is', array_keys($elements));
app('log')->debug(sprintf('Keys has "outro": %s', var_export($hasStep, true)));
return $hasStep;
}
@@ -113,7 +113,7 @@ class IntroController extends Controller
if ('' !== $specialPage) {
$key .= '_' . $specialPage;
}
Log::debug(sprintf('Going to mark the following route as NOT done: %s with special "%s" (%s)', $route, $specialPage, $key));
app('log')->debug(sprintf('Going to mark the following route as NOT done: %s with special "%s" (%s)', $route, $specialPage, $key));
app('preferences')->set($key, false);
app('preferences')->mark();
@@ -136,7 +136,7 @@ class IntroController extends Controller
if ('' !== $specialPage) {
$key .= '_' . $specialPage;
}
Log::debug(sprintf('Going to mark the following route as done: %s with special "%s" (%s)', $route, $specialPage, $key));
app('log')->debug(sprintf('Going to mark the following route as done: %s with special "%s" (%s)', $route, $specialPage, $key));
app('preferences')->set($key, true);
return response()->json(['result' => sprintf('Reported demo watched for route "%s" (%s): %s.', $route, $specialPage, $key)]);