Test Failed
Push — feature-laravel-5.4 ( edfc13...468b78 )
by Kirill
03:20
created

DocsStatus::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of laravel.su package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace App\Services\GitHub;
10
11
use Illuminate\Contracts\Support\Arrayable;
12
13
/**
14
 * Class DocsStatus.
15
 */
16
class DocsStatus implements Arrayable
17
{
18
    /**
19
     * @var string
20
     */
21
    private $hash;
22
23
    /**
24
     * @var string
25
     */
26
    private $path;
27
28
    /**
29
     * DocsStatus constructor.
30
     * @param string $path
31
     * @param string $hash
32
     */
33
    public function __construct(string $path, string $hash)
34
    {
35
        $this->hash = $hash;
36
        $this->path = $path;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getHash(): string
43
    {
44
        return $this->hash;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getPath(): string
51
    {
52
        return $this->path;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function toArray(): array
59
    {
60
        return [
61
            'path' => $this->path,
62
            'hash' => $this->hash,
63
        ];
64
    }
65
}