mvc5 /
mvc5
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * |
||||
| 4 | */ |
||||
| 5 | |||||
| 6 | namespace Mvc5\Route\Config; |
||||
| 7 | |||||
| 8 | use const Mvc5\{ ACTION, CHILDREN, CONSTRAINTS, CONTROLLER, DEFAULTS, |
||||
|
0 ignored issues
–
show
The type
Mvc5\CONSTRAINTS was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\DEFAULTS was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\ACTION was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||
| 9 | HOST, METHOD, NAME, OPTIONS, PATH, PORT, REGEX, SCHEME, TOKENS, WILDCARD }; |
||||
|
0 ignored issues
–
show
The type
Mvc5\OPTIONS was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\SCHEME was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\WILDCARD was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\HOST was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\REGEX was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\PATH was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\TOKENS was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\METHOD was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\PORT was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
The type
Mvc5\NAME was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||
| 10 | |||||
| 11 | trait Route |
||||
| 12 | { |
||||
| 13 | /** |
||||
| 14 | * @param string $name |
||||
| 15 | * @return callable|mixed |
||||
| 16 | */ |
||||
| 17 | 6 | function action(string $name) |
|||
| 18 | { |
||||
| 19 | 6 | return $this->get(ACTION)[$name] ?? null; |
|||
|
0 ignored issues
–
show
It seems like
get() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 20 | } |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @param string $name |
||||
| 24 | * @return array|\Mvc5\Route\Route|null |
||||
| 25 | */ |
||||
| 26 | 5 | function child(string $name) |
|||
| 27 | { |
||||
| 28 | 5 | return $this->get(CHILDREN)[$name] ?? null; |
|||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * @return iterable |
||||
| 33 | */ |
||||
| 34 | 15 | function children() : iterable |
|||
| 35 | { |
||||
| 36 | 15 | return $this[CHILDREN] ?? []; |
|||
| 37 | } |
||||
| 38 | |||||
| 39 | /** |
||||
| 40 | * @return array |
||||
| 41 | */ |
||||
| 42 | 6 | function constraints() : array |
|||
| 43 | { |
||||
| 44 | 6 | return $this[CONSTRAINTS] ?? []; |
|||
| 45 | } |
||||
| 46 | |||||
| 47 | /** |
||||
| 48 | * @return callable|mixed |
||||
| 49 | */ |
||||
| 50 | 14 | function controller() |
|||
| 51 | { |
||||
| 52 | 14 | return $this[CONTROLLER]; |
|||
| 53 | } |
||||
| 54 | |||||
| 55 | /** |
||||
| 56 | * @return array |
||||
| 57 | */ |
||||
| 58 | 22 | function defaults() : array |
|||
| 59 | { |
||||
| 60 | 22 | return $this[DEFAULTS] ?? []; |
|||
| 61 | } |
||||
| 62 | |||||
| 63 | /** |
||||
| 64 | * @return array|string|null |
||||
| 65 | */ |
||||
| 66 | 15 | function host() |
|||
| 67 | { |
||||
| 68 | 15 | return $this[HOST]; |
|||
| 69 | } |
||||
| 70 | |||||
| 71 | /** |
||||
| 72 | * @return array|string|null |
||||
| 73 | */ |
||||
| 74 | 16 | function method() |
|||
| 75 | { |
||||
| 76 | 16 | return $this[METHOD]; |
|||
| 77 | } |
||||
| 78 | |||||
| 79 | /** |
||||
| 80 | * @return string|null |
||||
| 81 | */ |
||||
| 82 | 23 | function name() : ?string |
|||
| 83 | { |
||||
| 84 | 23 | return $this[NAME]; |
|||
| 85 | } |
||||
| 86 | |||||
| 87 | /** |
||||
| 88 | * @return array |
||||
| 89 | */ |
||||
| 90 | 27 | function options() : array |
|||
| 91 | { |
||||
| 92 | 27 | return $this[OPTIONS] ?? []; |
|||
| 93 | } |
||||
| 94 | |||||
| 95 | /** |
||||
| 96 | * @return array|string|null |
||||
| 97 | */ |
||||
| 98 | 8 | function path() |
|||
| 99 | { |
||||
| 100 | 8 | return $this[PATH]; |
|||
| 101 | } |
||||
| 102 | |||||
| 103 | /** |
||||
| 104 | * @return int|null |
||||
| 105 | */ |
||||
| 106 | 9 | function port() : ?int |
|||
| 107 | { |
||||
| 108 | 9 | return $this[PORT]; |
|||
| 109 | } |
||||
| 110 | |||||
| 111 | /** |
||||
| 112 | * @return string|null |
||||
| 113 | */ |
||||
| 114 | 19 | function regex() : ?string |
|||
| 115 | { |
||||
| 116 | 19 | return $this[REGEX]; |
|||
| 117 | } |
||||
| 118 | |||||
| 119 | /** |
||||
| 120 | * @return array|string|null |
||||
| 121 | */ |
||||
| 122 | 11 | function scheme() |
|||
| 123 | { |
||||
| 124 | 11 | return $this[SCHEME]; |
|||
| 125 | } |
||||
| 126 | |||||
| 127 | /** |
||||
| 128 | * @return array |
||||
| 129 | */ |
||||
| 130 | 13 | function tokens() : array |
|||
| 131 | { |
||||
| 132 | 13 | return $this[TOKENS] ?? []; |
|||
| 133 | } |
||||
| 134 | |||||
| 135 | /** |
||||
| 136 | * @return bool |
||||
| 137 | */ |
||||
| 138 | 16 | function wildcard() : bool |
|||
| 139 | { |
||||
| 140 | 16 | return (bool) $this[WILDCARD]; |
|||
| 141 | } |
||||
| 142 | } |
||||
| 143 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths