Completed
Push — master ( d40614...680e53 )
by Sébastien
10s
created

WrongJsonExpectation   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getContextText() 0 4 1
1
<?php
2
3
namespace Rezzza\RestApiBehatExtension\Json;
4
5
use Rezzza\RestApiBehatExtension\ExpectationFailed;
6
7
class WrongJsonExpectation extends ExpectationFailed
8
{
9
    private $json;
10
11
    public function __construct($message, Json $json, $previous = null)
12
    {
13
        $this->json = $json;
14
        parent::__construct($message, 0, $previous);
15
    }
16
17
    public function getContextText()
18
    {
19
        return $this->json->encode(true);
20
    }
21
}
22