| Total Complexity | 2 |
| Total Lines | 41 |
| Duplicated Lines | 100 % |
| Coverage | 0% |
| Changes | 0 | ||
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
| 8 | View Code Duplication | trait UpdateAction |
|
| 9 | { |
||
| 10 | /** |
||
| 11 | * Doctrine repository from where get data. |
||
| 12 | * |
||
| 13 | * @return RestRepository |
||
| 14 | */ |
||
| 15 | abstract protected function repository(); |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @return RestResponseInterface |
||
| 19 | */ |
||
| 20 | abstract protected function response(); |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param UpdateRequestInterface $request |
||
| 24 | * @param $entity |
||
| 25 | * |
||
| 26 | * @return object |
||
| 27 | */ |
||
| 28 | abstract protected function updateEntity($request, $entity); |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param UpdateRequestInterface $request |
||
| 32 | * |
||
| 33 | * @return array |
||
| 34 | * @throws \Doctrine\ORM\EntityNotFoundException |
||
| 35 | */ |
||
| 36 | public function update(UpdateRequestInterface $request) |
||
| 51 |
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