StarEndpoint::getAllDetailed()   A
last analyzed

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
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Realshadow\Redtube\Endpoints;
4
5
use Illuminate\Support\Collection;
6
use Realshadow\Redtube\Entities\Stars;
7
8
9
/**
10
 * Star Endpoint
11
 *
12
 * @package Realshadow\Redtube\Endpoints
13
 * @author Lukáš Homza <[email protected]>
14
 */
15
class StarEndpoint extends AbstractEndpoint
16
{
17
18
    /**
19
     * Get all stars
20
     *
21
     * @return Collection
22
     * @throws \RuntimeException
23
     */
24
    public function getAll()
25
    {
26
        $response = $this->call('Stars.getStarList');
27
28
        return $this->serializer
29
            ->deserialize($response, Stars::class, static::OUTPUT_FORMAT)
30
            ->flatten();
31
    }
32
33
    /**
34
     * At the time of writing this (07.07.2017) this method always ends with "There are no stars!" error
35
     *
36
     * @throws \BadMethodCallException
37
     */
38
    public function getAllDetailed()
39
    {
40
        throw new \BadMethodCallException('This method is not yet implemented.');
41
    }
42
43
}
44