Passed
Pull Request — master (#1)
by Rafal
01:47
created

ExternalUrlDataProvider::getElements()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 12
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
namespace SpotifyApiConnect\Domain\DataTransferObject;
4
5
/**
6
 * Auto generated data provider
7
 */
8
final class ExternalUrlDataProvider extends \Xervice\DataProvider\Business\Model\DataProvider\AbstractDataProvider implements \Xervice\DataProvider\Business\Model\DataProvider\DataProviderInterface
9
{
10
    /** @var string */
11
    protected $spotify;
12
13
14
    /**
15
     * @return string
16
     */
17
    public function getSpotify(): ?string
18
    {
19
        return $this->spotify;
20
    }
21
22
23
    /**
24
     * @param string $spotify
25
     * @return ExternalUrlDataProvider
26
     */
27
    public function setSpotify(?string $spotify = null)
28
    {
29
        $this->spotify = $spotify;
30
31
        return $this;
32
    }
33
34
35
    /**
36
     * @return ExternalUrlDataProvider
37
     */
38
    public function unsetSpotify()
39
    {
40
        $this->spotify = null;
41
42
        return $this;
43
    }
44
45
46
    /**
47
     * @return bool
48
     */
49
    public function hasSpotify()
50
    {
51
        return ($this->spotify !== null && $this->spotify !== []);
52
    }
53
54
55
    /**
56
     * @return array
57
     */
58
    protected function getElements(): array
59
    {
60
        return array (
61
          'spotify' =>
62
          array (
63
            'name' => 'spotify',
64
            'allownull' => true,
65
            'default' => '',
66
            'type' => 'string',
67
            'is_collection' => false,
68
            'is_dataprovider' => false,
69
            'isCamelCase' => false,
70
          ),
71
        );
72
    }
73
}
74