Completed
Push — master ( b819b4...8115f1 )
by Sherif
14:17
created

CoreErrors::cannotUploadImage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Modules\Core\Errors;
4
5
class CoreErrors
6
{
7
    public function connectionError()
8
    {
9
        abort(500, trans('core::errors.connectionError'));
10
    }
11
12
    public function redisNotRunning()
13
    {
14
        abort(500, trans('core::errors.redisNotRunning'));
15
    }
16
17
    public function dbQueryError()
18
    {
19
        abort(500, trans('core::errors.dbQueryError'));
20
    }
21
22
    public function cannotCreateSetting()
23
    {
24
        abort(400, trans('core::errors.cannotCreateSetting'));
25
    }
26
27
    public function cannotUpdateSettingKey()
28
    {
29
        abort(400, trans('core::errors.cannotUpdateSettingKey'));
30
    }
31
32
    public function notFound($text)
33
    {
34
        abort(404, trans('core::errors.notFound', ['replace' => $text]));
35
    }
36
37
    public function cannotUploadImage()
38
    {
39
        abort(400, trans('core::errors.cannotUploadImage'));
40
    }
41
}
42