We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 19 | class Frontpage |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var Response |
||
| 23 | */ |
||
| 24 | private $response; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Webpage |
||
| 28 | */ |
||
| 29 | public $webpage; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var Page |
||
| 33 | */ |
||
| 34 | private $model; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Frontpage constructor. |
||
| 38 | * @param Page $model |
||
| 39 | * @param Collection $navigationRepository |
||
| 40 | */ |
||
| 41 | public function __construct(Page $model, Collection $navigationRepository) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string|null $template |
||
| 50 | * @param bool $override |
||
| 51 | * @param int $status |
||
| 52 | * @return Response |
||
| 53 | */ |
||
| 54 | public function publish(string $template = null, bool $override = true, int $status = 200, bool $errorResponse = false) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * A user can disable a webpage from being viewed. |
||
| 72 | * |
||
| 73 | * @param Page $page |
||
| 74 | * @return bool |
||
| 75 | */ |
||
| 76 | private function isDisabledPage(Page $page) |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Check if the website is in maintenance mode |
||
| 83 | * which is set by the user on the dashboard. |
||
| 84 | * |
||
| 85 | * @return bool |
||
| 86 | */ |
||
| 87 | public function isMaintenanceMode() |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Check if the current logged in user if exists, |
||
| 94 | * can bypass the maintenance and view it offline. |
||
| 95 | * |
||
| 96 | * @return bool |
||
| 97 | */ |
||
| 98 | public function canBypassMaintenance() |
||
| 102 | |||
| 103 | /** |
||
| 104 | * @param string|null $template |
||
| 105 | * @param bool $override |
||
| 106 | * @return string |
||
| 107 | */ |
||
| 108 | private function makeBlade(string $template = null, bool $override = true) |
||
| 120 | |||
| 121 | /** |
||
| 122 | * @param string $title |
||
| 123 | * @param string $description |
||
| 124 | * @param string $template |
||
| 125 | * @param int $response |
||
| 126 | * @return Response |
||
| 127 | */ |
||
| 128 | public static function build(string $title, string $description, string $template, int $response) |
||
| 136 | } |
||
| 137 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.