Passed
Push — main ( 44f9b3...d7b1c0 )
by Yaroslav
02:39
created

FileChunkSize::maxSize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace NovaChunkedVideo;
4
5
trait FileChunkSize
6
{
7
    /**
8
     * The file max size
9
     *
10
     * @var ?numeric
0 ignored issues
show
Bug introduced by
The type NovaChunkedVideo\numeric was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
     */
12
    protected $maxSize = null;
13
14
    /**
15
     * The chunk size
16
     *
17
     * @var ?numeric
18
     */
19
    protected $chunkSize = null;
20
21
    /**
22
     * Set the fields max sizes.
23
     *
24
     * @param $maxSize
25
     *
26
     * @return $this
27
     */
28 2
    public function maxSize($maxSize)
29
    {
30 2
        $this->maxSize = $maxSize;
31
32 2
        return $this;
33
    }
34
35
    /**
36
     * Set the chunk size.
37
     *
38
     * @param $chunkSize
39
     *
40
     * @return $this
41
     */
42 2
    public function chunkSize($chunkSize)
43
    {
44 2
        $this->chunkSize = $chunkSize;
45
46 2
        return $this;
47
    }
48
49
    /**
50
     * Get the fields max sizes.
51
     *
52
     * @return float|\Illuminate\Config\Repository|\Illuminate\Contracts\Foundation\Application|int|mixed|string
53
     */
54 4
    public function getMaxSize()
55
    {
56 4
        return $this->maxSize ?? config('nova-chunked.validation.max_size');
57
    }
58
59
    /**
60
     * Get the chunk size.
61
     *
62
     * @return float|\Illuminate\Config\Repository|\Illuminate\Contracts\Foundation\Application|int|mixed|string
63
     */
64 2
    public function getChunkSize()
65
    {
66 2
        return $this->chunkSize ?? config('nova-chunked.validation.chunk_size');
67
    }
68
}
69