RegexCompileException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace MobileDetect\Exception;
4
5
class RegexCompileException extends \RuntimeException implements ExceptionInterface
6
{
7
    /**
8
     * Holds any context vars for this exception.
9
     *
10
     * @var array
11
     */
12
    protected $context;
13
14
    /**
15
     * File where this happened.
16
     *
17
     * @var string
18
     */
19
    protected $file;
20
21
    /**
22
     * Line number in the file.
23
     *
24
     * @var int
25
     */
26
    protected $line;
27
28
    public function __construct($msg, $code, $file, $line, array $context, \Exception $previous = null)
0 ignored issues
show
Unused Code introduced by
The parameter $line is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        $msg = preg_replace('/^preg_[^(]+\(\)[ :]+/', '', $msg);
31
32
        parent::__construct($msg, $code, $previous);
33
        $this->context = $context;
34
    }
35
}
36