IsBase64Audio   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A message() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace Owowagency\LaravelMedia\Rules;
4
5
use Owowagency\LaravelMedia\Rules\Concerns\ValidatesBase64;
6
7
class IsBase64Audio extends StartsWithMimeType
8
{
9
    use ValidatesBase64;
10
11
    /**
12
     * IsBase64Audio constructor.
13
     */
14
    public function __construct()
15
    {
16
        parent::__construct('audio');
17
    }
18
19
    /**
20
     * Get the validation error message.
21
     *
22
     * @return string
23
     */
24
    public function message(): string
25
    {
26
        return trans('validation.custom.is_base_64_audio');
0 ignored issues
show
Bug Best Practice introduced by
The expression return trans('validation...stom.is_base_64_audio') could return the type array which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
27
    }
28
}
29