Completed
Push — master ( afbcfa...dca8ec )
by Márk
13:11 queued 11:26
created

HasErrorHandler::setErrorHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
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
     * @param ErrorHandler $errorHandler
21
     *
22
     * @return void
23
     */
24
    public function setErrorHandler(ErrorHandler $errorHandler): void
25
    {
26
        $this->errorHandler = $errorHandler;
27
    }
28
}
29