We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 14 | class OldBreadcrumbs |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Stored crumbs are placed in an array for use on blade template. |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $crumbs = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Removed crumbs from array for whatever reason. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | private $removed = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Specify characters to find from urls or arrays and replace with. |
||
| 32 | * |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | private $characters = ['find' => ['_', '-'], 'replace' => [' ', ' ']]; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Convert a url stirng to a usable breadcrumb object array. |
||
| 39 | * |
||
| 40 | * @param $string |
||
| 41 | * @return $this |
||
| 42 | * @throws \Exception |
||
| 43 | */ |
||
| 44 | public function parseUrlAsCrumbs($string) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Gets the current url for the user and applies it to a crumb. |
||
| 78 | * |
||
| 79 | * @return Breadcrumbs |
||
|
|
|||
| 80 | */ |
||
| 81 | public function fromCurrentUrl() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Enter a url that is an addition to the current domain. |
||
| 88 | * |
||
| 89 | * @param $string |
||
| 90 | * @return Breadcrumbs |
||
| 91 | */ |
||
| 92 | public function fromRelativeUrl($string) |
||
| 96 | |||
| 97 | /** |
||
| 98 | * A user entered domain name from scratch. |
||
| 99 | * |
||
| 100 | * @param $string |
||
| 101 | * @return $this |
||
| 102 | */ |
||
| 103 | public function fromAbsoluteUrl($string) |
||
| 107 | |||
| 108 | /** |
||
| 109 | * Validate a url string is a valid url string. |
||
| 110 | * |
||
| 111 | * @param $string |
||
| 112 | * @return $this |
||
| 113 | * @throws \Exception |
||
| 114 | */ |
||
| 115 | private function validateUrl($string) |
||
| 123 | |||
| 124 | /** |
||
| 125 | * Count the current crumbs that have been stored. |
||
| 126 | * |
||
| 127 | * @return int |
||
| 128 | */ |
||
| 129 | public function count() |
||
| 133 | |||
| 134 | /** |
||
| 135 | * Return the objects crumbs that have been stored. |
||
| 136 | * |
||
| 137 | * @return array |
||
| 138 | */ |
||
| 139 | public function crumbs() |
||
| 147 | |||
| 148 | /** |
||
| 149 | * Define if home should exist, this is bound to the preference settings |
||
| 150 | * as of right now. |
||
| 151 | * |
||
| 152 | * @param $boolean |
||
| 153 | * @return $this |
||
| 154 | * @throws \Exception |
||
| 155 | * @deprecated |
||
| 156 | */ |
||
| 157 | public function homeExists($boolean) |
||
| 169 | |||
| 170 | /** |
||
| 171 | * Remove a crumb from the object array. |
||
| 172 | * |
||
| 173 | * @param array $crumbs |
||
| 174 | * @return $this |
||
| 175 | * @throws \Exception |
||
| 176 | */ |
||
| 177 | public function remove($crumbs = []) |
||
| 189 | |||
| 190 | /** |
||
| 191 | * Alter a crumbs title to something else. |
||
| 192 | * |
||
| 193 | * @param array $crumbs |
||
| 194 | * @return $this |
||
| 195 | */ |
||
| 196 | public function rename($crumbs = []) |
||
| 206 | |||
| 207 | /** |
||
| 208 | * Check if the breadcrumb array contains a crumb name. |
||
| 209 | * |
||
| 210 | * @param $string |
||
| 211 | * @param null $array_key |
||
| 212 | * @return bool |
||
| 213 | */ |
||
| 214 | public function contain($string, $array_key = null) |
||
| 222 | |||
| 223 | private function keyExists($key, $array = []) |
||
| 231 | |||
| 232 | private function sliceKey($key) |
||
| 236 | |||
| 237 | /** |
||
| 238 | * Does this object has a home property allowed. |
||
| 239 | * |
||
| 240 | * @return bool |
||
| 241 | */ |
||
| 242 | public function hasHome() |
||
| 246 | |||
| 247 | /** |
||
| 248 | * Return a crumb by its key name from the object. |
||
| 249 | * |
||
| 250 | * @param $name |
||
| 251 | * @return mixed |
||
| 252 | * @throws \Exception |
||
| 253 | */ |
||
| 254 | private function crumb($name) |
||
| 262 | |||
| 263 | /** |
||
| 264 | * Change the title of a crumb. |
||
| 265 | * |
||
| 266 | * @param Breadcrumb $breadcrumb |
||
| 267 | * @param $string |
||
| 268 | * @return Breadcrumb |
||
| 269 | */ |
||
| 270 | private function changeCrumbTitle(Breadcrumb $breadcrumb, $string) |
||
| 274 | |||
| 275 | /** |
||
| 276 | * Add a new breadcrumb object to the crumbs array. |
||
| 277 | * |
||
| 278 | * @param Breadcrumb $breadcrumb |
||
| 279 | * @return Breadcrumb |
||
| 280 | */ |
||
| 281 | private function addCrumb(Breadcrumb $breadcrumb) |
||
| 285 | |||
| 286 | /** |
||
| 287 | * Remove breadcrumb object from the crumbs array. |
||
| 288 | * |
||
| 289 | * @param Breadcrumb $breadcrumb |
||
| 290 | * @param bool $boolean |
||
| 291 | * @return $this |
||
| 292 | */ |
||
| 293 | private function removeCrumb(Breadcrumb $breadcrumb, $boolean = true) |
||
| 301 | } |
||
| 302 | |||
| 362 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.