FieldException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 5
rs 10
1
<?php
2
namespace Lepton\Exceptions;
3
4
use Exception;
5
use Throwable;
6
use Lepton\Helpers\Functions;
7
8
class FieldException extends Exception{
9
10
  public function __construct(\ReflectionProperty $prop, $message = "", $code = 0, ?\Throwable $previous = null){
11
12
    $this->line = Functions::getDeclarationLine($prop);
13
    $this->file = $prop->getDeclaringClass()->getFileName();
14
    parent::__construct($message, $code, $previous);
15
  }
16
}