NewsletterMapper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setDbAdapter() 0 4 1
1
<?php
2
3
namespace Newsletter\Mapper;
4
5
use Zend\Db\Adapter\Adapter;
6
use Zend\Db\Adapter\AdapterAwareInterface;
7
use Zend\Db\TableGateway\AbstractTableGateway;
8
9
class NewsletterMapper extends AbstractTableGateway implements AdapterAwareInterface
10
{
11
    protected $table = 'newsletter';
12
13
    public function __construct(Adapter $adapter)
14
    {
15
        $this->adapter = $adapter;
16
        $this->initialize();
17
    }
18
19
    public function setDbAdapter(Adapter $adapter)
20
    {
21
        throw new \Exception('Set Adapter in constructor.');
22
    }
23
}
24