InvalidPropertyCallException::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace MagicProperties\Exceptions;
4
5
use Exception;
6
7
/**
8
 * Exception thrown if a class that uses
9
 * AutoAccessorTrait or AutoMutatorTrait
10
 * try to access a property in a wrong way.
11
 */
12
class InvalidPropertyCallException extends Exception
13
{
14
    const UNDEFINED_PROPERTY = 1;
15
    const NOT_ACCESSABLE_PROPERTY = 2;
16
17
    /**
18
     * Returns the string representation
19
     * of the Exception.
20
     *
21
     * @return string
22
     */
23
    public function __toString()
24
    {
25
        return __CLASS__."'{$this->message}' in {$this->file}, ({$this->line})\n, {$this->getTraceAsString()}";
26
    }
27
}
28