| Conditions | 12 |
| Paths | 1025 |
| Total Lines | 21 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 68 | public function execPreviousAction($action) |
||
| 69 | { |
||
| 70 | switch ($action) { |
||
| 71 | case 'ncf-rango-insert': |
||
| 72 | $valueIdEmpresa = $this->request->request->get('idempresa'); |
||
| 73 | $valueSerie = $this->request->request->get('serie_nueva'); |
||
| 74 | $valueUsuarioCreacion = $this->request->request->get('usuariocreacion'); |
||
| 75 | $valueFechaCreacion = $this->request->request->get('fechacreacion'); |
||
| 76 | $data = $this->request->request->all(); |
||
| 77 | $data['serie']=(isset($valueSerie) and $valueSerie !=='')?$valueSerie:$data['serie']; |
||
| 78 | $data['idempresa']=(isset($valueIdEmpresa) and $valueIdEmpresa !=='')?$valueIdEmpresa:$this->empresa->idempresa; |
||
| 79 | $data['usuariomodificacion']=(isset($valueFechaCreacion) and $valueFechaCreacion !=='')?$this->user->nick:null; |
||
| 80 | $data['usuariocreacion']=(isset($valueUsuarioCreacion) and $valueUsuarioCreacion !=='')?$valueUsuarioCreacion:$this->user->nick; |
||
| 81 | $data['fechacreacion']=(isset($valueFechaCreacion) and $valueFechaCreacion !=='')?$valueFechaCreacion:\date('Y-m-d'); |
||
| 82 | $rangoNuevo = new NCFRango(); |
||
| 83 | $rangoNuevo->loadFromData($data); |
||
| 84 | $rangoNuevo->save(); |
||
| 85 | $this->toolBox()->log()->notice('Rango nuevo guardado exitosamente'); |
||
| 86 | break; |
||
| 87 | } |
||
| 88 | return parent::execPreviousAction($action); |
||
| 89 | } |
||
| 91 |
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