Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
2 / 2
AccessError
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
 __construct
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
2 / 2
1<?php
2
3namespace LDC\LDCCRM\Exceptions;
4
5use Error;
6
7/**
8 * This is thrown when trying to set a value on an object property that does not exist.
9 *
10 * @package LDCCrmClient
11 * @subpackage exceptions
12 */
13class AccessError extends Error
14{
15    /**
16     * AccessError
17     *
18     * @param string $objectName   The object name where the property does not exist.
19     * @param string $propertyName The property name that does not exist.
20     */
21    public function __construct(string $objectName, string $propertyName)
22    {
23        parent::__construct("Tried to set value in $objectName->$propertyName, it does not exists.");
24    }
25}