Passed
Push — master ( 88ea97...aa75e3 )
by Joe Nilson
02:36
created

ConsultaDGII::createViews()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
/*
3
 * Copyright (C) 2022 Joe Nilson <[email protected]>
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU Lesser General Public License as
7
 * published by the Free Software Foundation, either version 3 of the
8
 * License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU Lesser General Public License for more details.
14
 * You should have received a copy of the GNU Lesser General Public License
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 */
17
18
namespace FacturaScripts\Plugins\fsRepublicaDominicana\Controller;
19
20
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...
21
use FacturaScripts\Plugins\fsRepublicaDominicana\Lib\WebserviceDgii;
22
23
class ConsultaDGII extends ListController
24
{
25
    protected function createViews()
26
    {
27
        // TODO: Implement createViews() method.
28
    }
29
30
    protected function execAfterAction($action)
31
    {
32
        switch ($action) {
33
            case 'busca_rnc':
34
                $this->setTemplate(false);
35
                $rncSearch = new WebserviceDgii();
36
                $resultado = $rncSearch->wdslSearch(0, $_REQUEST['cifnif']);
37
                if ($resultado) {
38
                    echo $resultado;
39
                } else {
40
                    echo '';
41
                }
42
                break;
43
            default:
44
                break;
45
        }
46
        parent::execPreviousAction($action);
47
    }
48
}