Issues (13)

src/Rules/IsBase64Image.php (1 issue)

1
<?php
2
3
namespace Owowagency\LaravelMedia\Rules;
4
5
use Owowagency\LaravelMedia\Rules\Concerns\ValidatesBase64;
6
7
class IsBase64Image extends StartsWithMimeType
8
{
9
    use ValidatesBase64;
10
11
    /**
12
     * IsBase64Image constructor.
13
     */
14
    public function __construct()
15
    {
16
        parent::__construct('image');
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_image');
0 ignored issues
show
Bug Best Practice introduced by
The expression return trans('validation...stom.is_base_64_image') 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