75% of 36OPs |
89% of 9Lines |
57% of 7Branches |
33% of 3Paths |
Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
---|---|---|---|---|---|---|---|---|
mageekguy\atoum\writers\std\out::init() | 36 | 75% | 9 | 89% | 7 | 57% | 3 | 33% |
# | |
---|---|
1 |
<?php |
2 |
|
3 |
namespace mageekguy\atoum\writers\std; |
4 |
|
5 |
use |
6 |
mageekguy\atoum, |
7 |
mageekguy\atoum\writers |
8 |
; |
9 |
|
10 |
class out extends writers\std |
11 |
{ |
12 |
protected function init()89% |
13 |
{ |
14 |
if ($this->resource === null) |
15 |
{ |
16 |
$resource = $this->adapter->fopen('php://stdout', 'w'); |
17 |
|
18 |
if ($resource === false) |
19 |
{ |
20 |
throw new exceptions\runtime('Unable to open php://stdout stream'); |
21 |
} |
22 |
|
23 |
$this->resource = $resource; |
24 |
} |
25 |
|
26 |
return $this; |
27 |
} |
28 |
} |