Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function moveAction(Request $request, $class, $id, $position) |
||
|
|||
11 | { |
||
12 | $entityManager = $this->getDoctrine() |
||
13 | ->getManager($this->container->getParameter('sludio_helper.entity.manager')) |
||
14 | ; |
||
15 | $map = $this->container->getParameter('sludio_helper.position.field')['entities']; |
||
16 | if (empty($map)) { |
||
17 | throw new InvalidConfigurationException('Please configure sludio_helper.position.field.enties to use move functionality'); |
||
18 | } |
||
19 | $class = $map[$class]; |
||
20 | $repo = $entityManager->getRepository($class); |
||
21 | $object = $repo->findOneById($id); |
||
22 | if ($object->getParent()) { |
||
23 | $repo->{'move'.ucfirst($position)}($object); |
||
24 | } |
||
25 | |||
26 | return $this->redirect($request->headers->get('referer')); |
||
27 | } |
||
29 |
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