PhpException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
/**
3
 * In this file the exception class '\UK\Core\PhpException' is defined.
4
 *
5
 * @author         UniKado <[email protected]>
6
 * @copyright  (c) 2016, UniKado
7
 * @package        UK
8
 * @since          2016-06-24
9
 * @subpackage     Errors
10
 * @version        0.1.0
11
 */
12
13
14
declare( strict_types = 1 );
15
16
17
namespace UK;
18
19
20
/**
21
 * This exception is used by UniKado error handler. It will only be thrown by the error handler, if a
22
 * catchable error occurs.
23
 *
24
 * <b>ATTENTION!</b> Never throw this exception inside your code!
25
 *
26
 * @since v0.1.0
27
 */
28
class PhpException extends CoreException
29
{
30
31
32
   // <editor-fold desc="// = = = =   P U B L I C   C O N S T R U C T O R   = = = = = = = = = = = = = = = = = = = = =">
33
34
   /**
35
    * Init's a new instance. Don't use it inside you're code!
36
    *
37
    * @param string  $message  The error message.
38
    * @param integer $code     The error code.
39
    * @param integer $line     The error line.
40
    * @param string  $file     The error file.
41
    */
42 1
   public function __construct( string $message, int $code, int $line, string $file )
43
   {
44
45
      // Call the parent constructor
46 1
      parent::__construct( \strip_tags( $message ), $code );
47
48
      // Setting the error file manually.
49 1
      $this->file = $file;
50
51
      // Setting the error line manually.
52 1
      $this->line = $line;
53
54 1
   }
55
56
   // </editor-fold>
57
58
59
}
60
61