Passed
Push — master ( 9a172a...9c608c )
by Joe Nilson
03:46 queued 13s
created

ListImpuestoProducto   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
eloc 8
c 1
b 1
f 1
dl 0
loc 19
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPageData() 0 7 1
A createViewsImpuestoProducto() 0 3 1
A createViews() 0 3 1
1
<?php
2
namespace FacturaScripts\Plugins\fsRepublicaDominicana\Controller;
3
4
use FacturaScripts\Core\Lib\ExtendedController\ListController;
0 ignored issues
show
Bug introduced by
The type FacturaScripts\Core\Lib\...ntroller\ListController was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
5
use FacturaScripts\Core\Model\Producto;
0 ignored issues
show
Bug introduced by
The type FacturaScripts\Core\Model\Producto was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class ListImpuestoProducto extends ListController
8
{
9
    public function getPageData(): array
10
    {
11
        $data = parent::getPageData();
12
        $data["title"] = "Impuestos y Articulos";
13
        $data["menu"] = "accounting";
14
        $data["icon"] = "fas fa-money-check-alt";
15
        return $data;
16
    }
17
18
    protected function createViews()
19
    {
20
        $this->createViewsImpuestoProducto();
21
    }
22
23
    protected function createViewsImpuestoProducto(string $viewName = "ListImpuestoProducto")
24
    {
25
        $this->addView($viewName, "ImpuestoProducto", "Impuestos y Articulos");
26
        // Esto es un ejemplo ... debe de cambiarlo según los nombres de campos del modelo
27
        // $this->addOrderBy($viewName, ["id"], "id", 2);
28
        // $this->addOrderBy($viewName, ["name"], "name");
29
        
30
        // Esto es un ejemplo ... debe de cambiarlo según los nombres de campos del modelo
31
        // $this->addSearchFields($viewName, ["id", "name"]);
32
    }
33
}
34