Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function __invoke(string $orderTokenValue): BinaryFileResponse |
||
37 | { |
||
38 | $invoice = $this->invoiceRepository->findOneByTokenValue($orderTokenValue); |
||
39 | $response = new BinaryFileResponse($this->invoiceFileResolver->resolveInvoicePath($invoice)); |
||
40 | |||
41 | $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT); |
||
42 | $response->headers->set('Content-Type', 'application/pdf'); |
||
43 | |||
44 | return $response; |
||
45 | } |
||
46 | } |
||
47 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.