Exception::getErrors()   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 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Ddeboer\Imap\Exception;
4
5
class Exception extends \RuntimeException
6
{
7
    protected $errors = array();
8
9
    public function __construct($message, $code = null, $previous = null)
10
    {
11
        parent::__construct($message, $code, $previous);
12
        $this->errors = imap_errors();
13
    }
14
15
    /**
16
     * Get IMAP errors
17
     *
18
     * @return array
19
     */
20
    public function getErrors()
21
    {
22
        return $this->errors;
23
    }
24
}
25