UploadException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Owowagency\LaravelMedia\Exceptions;
4
5
use Exception;
6
7
class UploadException extends Exception
8
{
9
    /**
10
     * UploadException constructor.
11
     *
12
     * @param  string  $type
13
     */
14
    public function __construct(string $type = 'string')
15
    {
16
        $message = trans('laravel-media::general.exception', [
17
            'type' => $type,
18
        ]);
19
20
        parent::__construct($message, 0, null);
0 ignored issues
show
Bug introduced by
It seems like $message can also be of type array and array; however, parameter $message of Exception::__construct() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

20
        parent::__construct(/** @scrutinizer ignore-type */ $message, 0, null);
Loading history...
21
    }
22
}
23