| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | declare(strict_types=1); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | namespace Flextype\Plugin\Admin\Controllers; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | use Flextype\Component\Filesystem\Filesystem; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  | use Psr\Http\Message\ResponseInterface as Response; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | use Psr\Http\Message\ServerRequestInterface as Request; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | use Ramsey\Uuid\Uuid; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | use function bin2hex; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | use function date; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | use function Flextype\Component\I18n\__; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | use function random_bytes; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | use function time; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  | class ApiController | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |      * Index page for API's | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |      * @param Request  $request  PSR7 request | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |      * @param Response $response PSR7 response | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 26 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 27 |  |  |     public function index(Request $request, Response $response) : Response | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                        
                            
            
                                    
            
            
                | 28 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 29 |  |  |         return flextype('twig')->render( | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                        
                            
            
                                    
            
            
                | 30 |  |  |             $response, | 
            
                                                                        
                            
            
                                    
            
            
                | 31 |  |  |             'plugins/admin/templates/system/api/index.html', | 
            
                                                                        
                            
            
                                    
            
            
                | 32 |  |  |             [ | 
            
                                                                        
                            
            
                                    
            
            
                | 33 |  |  |                 'menu_item' => 'api', | 
            
                                                                        
                            
            
                                    
            
            
                | 34 |  |  |                 'api_list' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 35 |  |  |                                 'entries' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 36 |  |  |                                   'title' => __('admin_entries'), | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                        
                            
            
                                    
            
            
                | 37 |  |  |                                   'icon' => ['name' => 'database', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 38 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 39 |  |  |                                 'registry' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 40 |  |  |                                   'title' => __('admin_registry'), | 
            
                                                                        
                            
            
                                    
            
            
                | 41 |  |  |                                   'icon' => ['name' => 'archive', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 42 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 43 |  |  |                                 'images' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 44 |  |  |                                   'title' => __('admin_images'), | 
            
                                                                        
                            
            
                                    
            
            
                | 45 |  |  |                                   'icon' => ['name' => 'images', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 46 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 47 |  |  |                                 'files' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 48 |  |  |                                   'title' => __('admin_files'), | 
            
                                                                        
                            
            
                                    
            
            
                | 49 |  |  |                                   'icon' => ['name' => 'file', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 50 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 51 |  |  |                                 'folders' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 52 |  |  |                                   'title' => __('admin_folders'), | 
            
                                                                        
                            
            
                                    
            
            
                | 53 |  |  |                                   'icon' => ['name' => 'folder', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 54 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 55 |  |  |                                 'access' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 56 |  |  |                                   'title' => __('admin_access'), | 
            
                                                                        
                            
            
                                    
            
            
                | 57 |  |  |                                   'icon' => ['name' => 'user-shield', 'set' => 'fontawesome|solid'], | 
            
                                                                        
                            
            
                                    
            
            
                | 58 |  |  |                                 ], | 
            
                                                                        
                            
            
                                    
            
            
                | 59 |  |  |                                ], | 
            
                                                                        
                            
            
                                    
            
            
                | 60 |  |  |                 'links' =>  [ | 
            
                                                                        
                            
            
                                    
            
            
                | 61 |  |  |                     'api' => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 62 |  |  |                         'link' => flextype('router')->pathFor('admin.api.index'), | 
            
                                                                        
                            
            
                                    
            
            
                | 63 |  |  |                         'title' => __('admin_api'), | 
            
                                                                        
                            
            
                                    
            
            
                | 64 |  |  |                         'active' => true, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |                     ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |                 ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |             ] | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 70 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 71 |  |  |  | 
            
                        
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