UploadException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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