'

There is no help for this route, or there is no help available in your language.

', 'title' => $title, ]; Log::debug('Going to get from Github: ' . $uri); $result = Requests::get($uri); Log::debug('Status code was ' . $result->status_code . '.'); if ($result->status_code === 200) { $content['text'] = $result->body; } if (strlen(trim($content['text'])) == 0) { Log::debug('No actual help text for this route (even though a page was found).'); $content['text'] = '

There is no help for this route, or there is no help available in your language.

'; } $converter = new CommonMarkConverter(); $content['text'] = $converter->convertToHtml($content['text']); return $content; } /** * @codeCoverageIgnore * * @param string $route * * @return bool */ public function hasRoute(string $route):bool { return Route::has($route); } /** * @codeCoverageIgnore * * @param string $route * * @return bool */ public function inCache(string $route):bool { return Cache::has('help.' . $route . '.title') && Cache::has('help.' . $route . '.text'); } /** * @codeCoverageIgnore * * @param string $route * @param array $content * * @internal param $title */ public function putInCache(string $route, array $content) { Cache::put('help.' . $route . '.text', $content['text'], 10080); // a week. Cache::put('help.' . $route . '.title', $content['title'], 10080); } }