GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

blogControlador::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/* 
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
class blogControlador extends \Sistema\Nucleo\CFControlador
10
{
11
    
12
    private $_ayuda;
13
14
15
    public function __construct() {
16
        parent::__construct();
17
        
18
        
19
        $this->_ayuda = new Sistema\Ayudantes\CFPHPAyuda();
20
    }
21
    
22
    public function index(){
23
        $datas = $this->cargaModelo('blog');       
24
        
25
        $this->_vista->postear= $datas->llamarDatosBlog();
0 ignored issues
show
Bug introduced by
The property postear does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
26
        $this->_vista->categorias= $datas->llamarDatosCategoria();
0 ignored issues
show
Bug introduced by
The property categorias does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
27
        $this->_vista->tags= $datas->llamarDatosTags();
0 ignored issues
show
Bug introduced by
The property tags does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
28
        $this->_vista->titulo = 'Blog Calima Framework';
0 ignored issues
show
Bug introduced by
The property titulo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
29
        $this->_vista->imprimirVista('index', 'blog');       
0 ignored issues
show
Documentation introduced by
'blog' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
30
        
31
    }
32
    public function crearpost(){
33
        $datas = $this->cargaModelo('blog');       
34
        
35
        $this->_vista->postear= $datas->llamarDatosBlog();
0 ignored issues
show
Bug introduced by
The property postear does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
36
        $this->_vista->titulo = 'Blog Calima Framework crear post';
0 ignored issues
show
Bug introduced by
The property titulo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
37
        $this->_vista->imprimirVista('crearpost', 'blog');  
0 ignored issues
show
Documentation introduced by
'blog' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
38
        
39
    }
40
    
41
    public function wikipost(){
0 ignored issues
show
Coding Style introduced by
wikipost uses the super-global variable $_GET which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
Coding Style introduced by
wikipost uses the super-global variable $_POST which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
42
        $datas = $this->cargaModelo('blog');       
43
        
44
        $this->_vista->postear= $datas->llamarDatosBlog();
0 ignored issues
show
Bug introduced by
The property postear does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
45
        $this->_vista->tags= $datas->llamarDatosTags();
0 ignored issues
show
Bug introduced by
The property tags does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
46
        $this->_vista->comentarios= $datas->llamarComentarios();
0 ignored issues
show
Bug introduced by
The property comentarios does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
47
        $this->_vista->categorias= $datas->llamarDatosCategoria();
0 ignored issues
show
Bug introduced by
The property categorias does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
48
        $this->_vista->contar= $datas->contarComentarios($_GET['id']);
0 ignored issues
show
Bug introduced by
The property contar does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
49
        $this->_vista->video= $datas->llamarDatosBlogId($_GET['id']);
0 ignored issues
show
Bug introduced by
The property video does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
50
        $this->_vista->titulo = 'Blog 1 Calima Framework';
0 ignored issues
show
Bug introduced by
The property titulo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
51
        $this->_vista->imprimirVista('wikipost', 'blog');  
0 ignored issues
show
Documentation introduced by
'blog' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
52
        
53
        
54
        $this->_vista->titulo = 'Registro CalimaFramework';
55
            if(isset($_GET['titulo'])){
56
            $this->_vista->salida_campo = $_GET['titulo'];
0 ignored issues
show
Bug introduced by
The property salida_campo does not seem to exist in Sistema\Nucleo\CFVista.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
57
            }
58
            
59
            $this->_vista->imprimirVista('wikipost', 'blog');
0 ignored issues
show
Documentation introduced by
'blog' is of type string, but the function expects a boolean.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
60
            //$datas = $this->cargaModelo('blog');
61
            if (isset($_POST['enviar'])&& isset($_POST['option1'])  ) {
62
                
63
                $datas->insertarDatos(
64
                     $this->_ayuda->filtrarEntero($_POST['id']),
65
                     $this->_ayuda->filtrarTexto($_POST['nombre']),
0 ignored issues
show
Bug introduced by
The method filtrarTexto() does not seem to exist on object<Sistema\Ayudantes\CFPHPAyuda>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
66
                     $this->_ayuda->filtrarTexto($_POST['email']),
0 ignored issues
show
Bug introduced by
The method filtrarTexto() does not seem to exist on object<Sistema\Ayudantes\CFPHPAyuda>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
67
                     $this->_ayuda->filtrarTexto($_POST['comentario'])
0 ignored issues
show
Bug introduced by
The method filtrarTexto() does not seem to exist on object<Sistema\Ayudantes\CFPHPAyuda>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
68
                    );
69
                echo $this->_ayuda->filtrarEntero('id');
70
                $_POST['option1']=false;
71
                
72
            }
73
        
74
    }
75
    
76
    public function insertarComentario(){
77
        
78
         /*$this->_vista->titulo = 'Registro CalimaFramework';
79
            if(isset($_GET['titulo'])){
80
            $this->_vista->salida_campo = $_GET['titulo'];
81
            }
82
            
83
            $this->_vista->imprimirVista('wikipost', 'blog');
84
            $datas = $this->cargaModelo('blog');
85
            if (isset($_POST['titulos'])) {
86
                $id_unico=$this->_ayud->filtrarEntero($_POST['id']).$this->_ayud->aleatorio();
87
                $datas->insertarDatos(
88
                     $id_unico,
89
                     $this->_ayud->filtrarTexto($_POST['nombre']),
90
                     $this->_ayud->filtrarTexto($_POST['email']),
91
                     $this->_ayud->filtrarTexto($_POST['comentario'])
92
                    );
93
                echo $this->_ayud->filtrarEntero('id');
94
            }*/
95
        
96
    }
97
    
98
    
99
    
100
    
101
    
102
            
103
}