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.

CustomerTable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 42
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A fetchAllSelect() 0 12 1
A fetchAllInstitutionRequests() 0 10 1
1
<?php
2
/**
3
 * ZfTable ( Module for Zend Framework 2)
4
 *
5
 * @copyright Copyright (c) 2013 Piotr Duda [email protected]
6
 * @license   MIT License
7
 */
8
9
namespace ZfTable\Example\Model;
10
11
use Zend\Db\TableGateway\AbstractTableGateway;
12
use Zend\Db\Adapter\Adapter;
13
use Zend\Db\ResultSet\ResultSet;
14
use Zend\Db\Sql\Sql;
15
16
class CustomerTable extends AbstractTableGateway
17
{
18
19
20
    protected $table = 'customer';
21
22
    public function __construct(Adapter $adapter)
23
    {
24
        $this->adapter = $adapter;
25
        $this->resultSetPrototype = new ResultSet();
26
        $this->resultSetPrototype->setArrayObjectPrototype(new Customer());
27
28
        $this->initialize();
29
    }
30
31
    public function fetchAllSelect()
32
    {
33
        $sql = new Sql($this->adapter);
34
35
        $select = $sql->select();
36
        $select->from('customer')
37
            ->columns(array('*'))
38
        ;
39
40
        return $select;
41
42
    }
43
44
    /**
45
     * @return \Zend\Db\Sql\Select
46
     */
47
    public function fetchAllInstitutionRequests()
48
    {
49
50
        $sql = new Sql($this->adapter);
51
        $select = $sql->select()
52
                ->from(array('i' => 'institution'), array('address'))
53
                ->join(array('u' => 'user'), 'i.user_id = u.id', array('name'));
54
55
        return $select;
56
    }
57
}
58