Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function __construct( |
||
19 | private EntityManagerInterface $em, |
||
20 | private HydratorService $hydratorService |
||
21 | ) {} |
||
22 | |||
23 | public function __invoke(Request $request): Response |
||
24 | { |
||
25 | |||
26 | try { |
||
27 | $file = $request->files->get('file'); |
||
28 | |||
29 | if (!$file) { |
||
30 | throw new BadRequestHttpException('No file provided'); |
||
31 | } |
||
32 | |||
33 | $content = file_get_contents($file->getPathname()); |
||
34 | $fileType = $file->getClientMimeType(); |
||
35 | $originalFilename = $file->getClientOriginalName(); |
||
36 | |||
37 | $fileEntity = new File(); |
||
38 | $fileEntity->setContent($content); |
||
39 | $fileEntity->setFileType($fileType); |
||
49 |
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