ErrorMessage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 3 Features 0
Metric Value
c 4
b 3
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace PEIP\Message;
4
5
/*
6
 * This file is part of the PEIP package.
7
 * (c) 2009-2016 Timo Michna <timomichna/yahoo.de>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
/**
14
 * ErrorMessage.
15
 *
16
 * @author Timo Michna <timomichna/yahoo.de>
17
 * @extends \PEIP\Message\GenericMessage
18
 * @implements \PEIP\INF\Base\Buildable, \PEIP\INF\Message\Message, \PEIP\INF\Base\Container
19
 */
20
class ErrorMessage extends \PEIP\Message\GenericMessage implements \PEIP\INF\Message\Message
21
{
22
    protected $payload;
23
24
    protected $headers;
25
26
    /**
27
     * @param $payload
28
     * @param $headers
29
     *
30
     * @return
31
     */
32
    public function __construct(\Exception $payload, array $headers = [])
33
    {
34
        $this->payload = $payload;
35
        $this->headers = $headers;
36
    }
37
}
38