Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class PersistStep extends AbstractStep |
||
12 | { |
||
13 | /** |
||
14 | * @var EntityManager |
||
15 | */ |
||
16 | protected $manager; |
||
17 | |||
18 | public function execute() |
||
19 | { |
||
20 | $entity = $this->getFromResponse('entity'); |
||
21 | |||
22 | try { |
||
23 | $this->manager->persist($entity); |
||
24 | $this->manager->flush(); |
||
25 | } catch (ORMException $exception) { |
||
26 | throw new BadRequestHttpException('Your request can not be stored', $exception); |
||
27 | } |
||
28 | |||
29 | $this->createResponse(['response_data' => $entity], true, 200); |
||
30 | } |
||
31 | |||
32 | public function setDoctrine(EntityManager $manager) |
||
35 | } |
||
36 | |||
37 | public function requiresBefore() |
||
43 | } |
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