Test Failed
Pull Request — master (#58)
by
unknown
02:12
created

FetchException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 3 1
A __construct() 0 8 1
1
<?php
2
3
namespace shweshi\OpenGraph\Exceptions;
4
5
class FetchException extends \Exception
6
{
7
    public function __construct(
8
        $message = '',
9
        $code = 0,
10
        \Throwable $previous = null,
11
        $data = []
12
    ) {
13
        parent::__construct($message, $code, $previous);
14
        $this->data = $data;
0 ignored issues
show
Bug Best Practice introduced by
The property data does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
15
    }
16
17
    public function getData()
18
    {
19
        return $this->data;
20
    }
21
}
22