Test Failed
Push — feature-laravel-5.4 ( fbc913...c5d92a )
by Kirill
03:14
created

ExternalDocsPage::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
rs 10
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 ExternalDocsPage.
15
 */
16
class ExternalDocsPage implements Arrayable
17
{
18
    /**
19
     * @var string
20
     */
21
    private $url;
22
23
    /**
24
     * @var string
25
     */
26
    private $content;
27
28
    /**
29
     * ExternalDocsPage constructor.
30
     * @param string $url
31
     * @param string $content
32
     */
33
    public function __construct(string $url, string $content)
34
    {
35
        $this->url = $url;
36
        $this->content = $content;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getUrl(): string
43
    {
44
        return $this->url;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getContent(): string
51
    {
52
        return $this->content;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function toArray(): array
59
    {
60
        return [
61
            'url'     => $this->url,
62
            'content' => $this->content,
63
        ];
64
    }
65
}