alphazframework /
framework
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This file is part of the alphaz Framework. |
||
| 5 | * |
||
| 6 | * @author Muhammad Umer Farooq (Malik) <[email protected]> |
||
| 7 | * |
||
| 8 | * @link https://github.com/alphazframework/framework |
||
| 9 | * |
||
| 10 | * @author Muhammad Umer Farooq <[email protected]> |
||
| 11 | * |
||
| 12 | * @author-profile https://www.facebook.com/Muhammadumerfarooq01/ |
||
| 13 | * |
||
| 14 | * For the full copyright and license information, please view the LICENSE |
||
| 15 | * file that was distributed with this source code. |
||
| 16 | * |
||
| 17 | * @license MIT |
||
| 18 | */ |
||
| 19 | |||
| 20 | namespace alphaz\Console\Commands; |
||
| 21 | |||
| 22 | use alphaz\Console\Command; |
||
| 23 | use alphaz\Console\Output; |
||
| 24 | use alphaz\Router\App; |
||
| 25 | |||
| 26 | class RouterListCommand extends Command |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * Sign of the command. |
||
| 30 | * |
||
| 31 | * @since 1.0.0 |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected $sign = 'route:list'; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Description of the command. |
||
| 39 | * |
||
| 40 | * @since 1.0.0 |
||
| 41 | * |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | protected $description = 'List all registered routes'; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * App instance. |
||
| 48 | * |
||
| 49 | * @since 1.0.0 |
||
| 50 | * |
||
| 51 | * @var \alphaz\Router\App |
||
| 52 | */ |
||
| 53 | private $app; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Create a new command instance. |
||
| 57 | * |
||
| 58 | * @return void |
||
| 59 | */ |
||
| 60 | public function __construct() |
||
| 61 | { |
||
| 62 | parent::__construct(); |
||
| 63 | $this->app = new App(); |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Function to handle the class. |
||
| 68 | * |
||
| 69 | * @param \alphaz\Console\Output $output |
||
| 70 | * @param \alphaz\Console\Input $input |
||
| 71 | * @param array $param |
||
| 72 | * |
||
| 73 | * @return void |
||
| 74 | */ |
||
| 75 | public function handle(Output $output, Input $input, $param = []): void |
||
|
0 ignored issues
–
show
|
|||
| 76 | { |
||
| 77 | $routers = $this->app->getRoutes(); |
||
| 78 | var_dump($routers); |
||
|
0 ignored issues
–
show
|
|||
| 79 | } |
||
| 80 | } |
||
| 81 |
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