ListImpuestoProducto   A
last analyzed

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