Completed
Push — master ( f002f3...6be6c0 )
by Alessandro
01:49
created

InvalidArgumentException::__construct()   A

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 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @package Infibiotech\JsonCache
4
 * @version 1.0.0-alpha
5
 * @author Alessandro Raffa, Infobiotech S.r.l. <[email protected]>
6
 * @copyright (c) 2014-2017, Infobiotech S.r.l.
7
 * @license http://mit-license.org/
8
 * @uses psr/simple-cache
9
 */
10
declare(strict_types = 1);
11
12
namespace Infobiotech\JsonCache\Psr16;
13
14
/** SPL use block. */
15
use Throwable;
16
/** PSR-16 use block. */
17
use Psr\SimpleCache\CacheException as PsrCacheException;
18
use Psr\SimpleCache\InvalidArgumentException as PsrInvalidArgumentException;
19
20
/**
21
 * CacheInvalidArgumentException Class
22
 * Will be thrown if arguments given to caching functions are invalid or unacceptable.
23
 *
24
 * @author Alessandro Raffa, Infobiotech S.r.l. <[email protected]>
25
 */
26
class InvalidArgumentException extends PsrCacheException implements PsrInvalidArgumentException
27
{
28
29
    /**
30
     * Creates the exception object.
31
     *
32
     * @param string         $message
33
     * @param Throwable|null $previous
34
     */
35
    public function __construct(string $message, Throwable $previous = null)
36
    {
37
        parent::__construct($message, $previous);
0 ignored issues
show
Bug introduced by
The method __construct() does not exist on Psr\SimpleCache\CacheException. It seems like you code against a sub-type of Psr\SimpleCache\CacheException such as Infobiotech\JsonCache\Ps...nvalidArgumentException. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
        parent::/** @scrutinizer ignore-call */ 
38
                __construct($message, $previous);
Loading history...
38
    }
39
}
40