Completed
Push — develop ( b1e0d8...d70504 )
by Daniel
14s queued 10s
created

ValidationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A errorMessage() 0 3 1
1
<?php
2
3
//declare(strict_types=1);
4
5
namespace InShore\Bookwhen\Exceptions;
6
7
use InShore\Bookwhen\Exceptions\InshoreBookwhenException;
8
9
/**
10
 * InshoreBookwhenConfigurationException Class
11
 * 
12
 * @package inshore\Bookwhen
13
 */
14
class ValidationException extends InshoreBookwhenException
15
{
16
    
17
    
18
    
19
    
20
    private $key;
21
    
22
    private $value;
23
    
24
    /**
25
     * 
26
     * @param unknown $key
0 ignored issues
show
Bug introduced by
The type InShore\Bookwhen\Exceptions\unknown was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
27
     * @param unknown $value
28
     */
29
    public function __construct($key, $value) {
30
        $this->key = $key;
31
        $this->value = $value;
32
    }
33
    
34
    /**
35
     * 
36
     * @return string
37
     */
38
    public function errorMessage() {
39
40
        return 'Validation Error!<br/>The value "' . $this->value . '" is invalid for ' . $this->key . '.<br/>Please refer to the package documentation <a href=https://github.com/inshore/bookwhen>https://github.com/inshore/bookwhen</a> or <a href=https://api.bookwhen.com/v2>https://api.bookwhen.com/v2</a>';
41
    }
42
}
43
44
//EOF!
45