Total Complexity | 6 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
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 | ), |
||
74 |