Completed
Push — master ( 0afe29...1d6efb )
by WEBEWEB
01:12
created

PopularVideosRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 0
Metric Value
dl 0
loc 32
c 0
b 0
f 0
wmc 2
lcom 0
cbo 7
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResourcePath() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the pexels-library package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Pexels\Model\Request;
13
14
use WBW\Library\Pexels\Model\AbstractRequest;
15
use WBW\Library\Pexels\Traits\MaxDurationTrait;
16
use WBW\Library\Pexels\Traits\MaxWidthTrait;
17
use WBW\Library\Pexels\Traits\MinDurationTrait;
18
use WBW\Library\Pexels\Traits\MinWidthTrait;
19
use WBW\Library\Pexels\Traits\PageTrait;
20
use WBW\Library\Pexels\Traits\PerPageTrait;
21
22
/**
23
 * Popular videos request.
24
 *
25
 * @author webeweb <https://github.com/webeweb/>
26
 * @package WBW\Library\Pexels\Model\Request
27
 */
28
class PopularVideosRequest extends AbstractRequest {
29
30
    use MinDurationTrait;
31
    use MinWidthTrait;
32
    use MaxDurationTrait;
33
    use MaxWidthTrait;
34
    use PageTrait;
35
    use PerPageTrait;
36
37
    /**
38
     * Popular videos resource path.
39
     *
40
     * @var string
41
     */
42
    const POPULAR_VIDEOS_RESOURCE_PATH = "/videos/popular";
43
44
    /**
45
     * Constructor.
46
     */
47
    public function __construct() {
48
        parent::__construct();
49
        $this->setPage(1);
50
        $this->setPerPage(15);
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    public function getResourcePath() {
57
        return self::POPULAR_VIDEOS_RESOURCE_PATH;
58
    }
59
}
60