100% of 32OPs |
100% of 5Lines |
67% of 3Branches |
100% of 3Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\reader::__construct() | 10 | 100% | 2 | 100% | 1 | 0% | 1 | 100% |
mageekguy\atoum\reader::setAdapter() | 16 | 100% | 2 | 100% | 1 | 100% | 1 | 100% |
mageekguy\atoum\reader::getAdapter() | 6 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum; |
4 |
|
5 |
abstract class reader |
6 |
{ |
7 |
protected $adapter = null; |
8 |
|
9 |
public function __construct(adapter $adapter = null)100% |
10 |
{ |
11 |
$this->setAdapter($adapter); |
12 |
} |
13 |
|
14 |
public function setAdapter(adapter $adapter = null)100% |
15 |
{ |
16 |
$this->adapter = $adapter ?: new adapter(); |
17 |
|
18 |
return $this; |
19 |
} |
20 |
|
21 |
public function getAdapter()100% |
22 |
{ |
23 |
return $this->adapter; |
24 |
} |
25 |
|
26 |
public abstract function read($length = null); |
27 |
} |