nystudio107 /
craft-retour
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * Retour plugin for Craft CMS |
||||
| 4 | * |
||||
| 5 | * Retour allows you to intelligently redirect legacy URLs, so that you don't |
||||
| 6 | * lose SEO value when rebuilding & restructuring a website |
||||
| 7 | * |
||||
| 8 | * @link https://nystudio107.com/ |
||||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||||
| 9 | * @copyright Copyright (c) 2018 nystudio107 |
||||
|
0 ignored issues
–
show
|
|||||
| 10 | */ |
||||
|
0 ignored issues
–
show
|
|||||
| 11 | |||||
| 12 | namespace nystudio107\retour\variables; |
||||
| 13 | |||||
| 14 | use nystudio107\pluginvite\variables\ViteVariableInterface; |
||||
| 15 | use nystudio107\pluginvite\variables\ViteVariableTrait; |
||||
| 16 | use nystudio107\retour\Retour; |
||||
| 17 | |||||
| 18 | /** |
||||
|
0 ignored issues
–
show
|
|||||
| 19 | * @author nystudio107 |
||||
|
0 ignored issues
–
show
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
|
|||||
| 20 | * @package Retour |
||||
|
0 ignored issues
–
show
|
|||||
| 21 | * @since 3.0.0 |
||||
|
0 ignored issues
–
show
|
|||||
| 22 | */ |
||||
|
0 ignored issues
–
show
|
|||||
| 23 | class RetourVariable implements ViteVariableInterface |
||||
| 24 | { |
||||
| 25 | use ViteVariableTrait; |
||||
| 26 | |||||
| 27 | // Public Methods |
||||
| 28 | // ========================================================================= |
||||
| 29 | |||||
| 30 | /** |
||||
| 31 | * Returns the list of matching schemes |
||||
| 32 | * |
||||
| 33 | * @return array |
||||
| 34 | */ |
||||
| 35 | public function getMatchesList(): array |
||||
| 36 | { |
||||
| 37 | return Retour::$plugin->redirects->getMatchesList(); |
||||
|
0 ignored issues
–
show
The method
getMatchesList() does not exist on null.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||
| 38 | } |
||||
| 39 | |||||
| 40 | /** |
||||
| 41 | * Return the http status code |
||||
| 42 | * |
||||
| 43 | * @return int |
||||
| 44 | */ |
||||
| 45 | public function getHttpStatus(): int |
||||
| 46 | { |
||||
| 47 | return http_response_code(); |
||||
|
0 ignored issues
–
show
|
|||||
| 48 | } |
||||
| 49 | |||||
| 50 | /** |
||||
| 51 | * Return whether we are running Craft 3.1 or later |
||||
| 52 | * |
||||
| 53 | * @return bool |
||||
| 54 | */ |
||||
| 55 | public function craft31(): bool |
||||
| 56 | { |
||||
| 57 | return true; |
||||
| 58 | } |
||||
| 59 | |||||
| 60 | /** |
||||
| 61 | * Return whether we are running Craft 3.2 or later |
||||
| 62 | * |
||||
| 63 | * @return bool |
||||
| 64 | */ |
||||
| 65 | public function craft32(): bool |
||||
| 66 | { |
||||
| 67 | return true; |
||||
| 68 | } |
||||
| 69 | } |
||||
| 70 |