StreamException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getOperation() 0 4 1
1
<?php
2
3
namespace Phloppy\Stream;
4
5
use Phloppy\Exception;
6
7
class StreamException extends Exception {
8
9
    const OP_READ  = 0;
10
    const OP_WRITE = 1;
11
12
    private $operation;
13
14 4
    public function __construct($operation, $message = '', $code = null, \Exception $prev = null)
15
    {
16 4
        parent::__construct($message, $code, $prev);
17 4
        $this->operation = $operation;
18 4
    }
19
20
21
    /**
22
     * @return mixed
23
     */
24 1
    public function getOperation()
25
    {
26 1
        return $this->operation;
27
    }
28
}