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.

Fixture   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 1
cbo 3
dl 0
loc 40
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A insert() 0 11 1
1
<?php
2
3
namespace ConsoleTools\Model;
4
5
use Zend\Db\Adapter\Adapter;
6
use Zend\Db\Sql\Sql;
7
8
/**
9
 * Apply fixture to database
10
 *
11
 * @author     V.Leontiev <[email protected]>
12
 * @license    http://opensource.org/licenses/MIT MIT
13
 * @since      php 5.6 or higher
14
 * @see        https://github.com/newage/console-tools
15
 */
16
class Fixture
17
{
18
    
19
    /**
20
     * Current db adapter
21
     * 
22
     * @var Adapter
23
     */
24
    protected $adapter = null;
25
    
26
    /**
27
     * Constructor
28
     * Create migration table
29
     * Set current db adapter
30
     * 
31
     * @param \Zend\Db\Adapter\Adapter $adapter
32
     */
33
    public function __construct($adapter = null)
34
    {
35
        $this->adapter = $adapter;
36
    }
37
    
38
    /**
39
     * 
40
     * @param string $tableName
41
     * @param array $data
42
     * @return bool
43
     */
44
    public function insert($tableName, Array $data)
0 ignored issues
show
Coding Style introduced by
As per coding-style, PHP keywords should be in lowercase; expected array, but found Array.
Loading history...
45
    {
46
        $sql = new Sql($this->adapter);
47
        $insert = $sql->insert($tableName);
48
        $insert->values($data);
49
        
50
        $sqlString = $sql->getSqlStringForSqlObject($insert);
0 ignored issues
show
Deprecated Code introduced by
The method Zend\Db\Sql\Sql::getSqlStringForSqlObject() has been deprecated with message: Deprecated in 2.4. Use buildSqlString() instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
51
        $results = $this->adapter->query($sqlString, Adapter::QUERY_MODE_EXECUTE);
52
53
        return $results;
54
    }
55
}
56