HasErrorHandler::setErrorHandler()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Nofw\Error;
4
5
/**
6
 * Describes an error handler aware instance.
7
 *
8
 * @author Márk Sági-Kazár <[email protected]>
9
 */
10
trait HasErrorHandler
11
{
12
    /**
13
     * @var ErrorHandler
14
     */
15
    protected $errorHandler;
16
17
    /**
18
     * Sets an error handler instance.
19
     */
20
    public function setErrorHandler(ErrorHandler $errorHandler): void
21
    {
22
        $this->errorHandler = $errorHandler;
23
    }
24
}
25