Completed
Push — master ( 026ae8...9deabe )
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
wmc 2
lcom 0
cbo 7
dl 0
loc 32
rs 10
c 0
b 0
f 0

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\Request;
13
14
use WBW\Library\Core\Model\Attribute\IntegerPageTrait;
15
use WBW\Library\Pexels\Model\Attribute\IntegerMaxDurationTrait;
16
use WBW\Library\Pexels\Model\Attribute\IntegerMaxWidthTrait;
17
use WBW\Library\Pexels\Model\Attribute\IntegerMinDurationTrait;
18
use WBW\Library\Pexels\Model\Attribute\IntegerMinWidthTrait;
19
use WBW\Library\Pexels\Model\Attribute\IntegerPerPageTrait;
20
21
/**
22
 * Popular videos request.
23
 *
24
 * @author webeweb <https://github.com/webeweb/>
25
 * @package WBW\Library\Pexels\Request
26
 */
27
class PopularVideosRequest extends AbstractRequest {
28
29
    use IntegerMinDurationTrait;
30
    use IntegerMinWidthTrait;
31
    use IntegerMaxDurationTrait;
32
    use IntegerMaxWidthTrait;
33
    use IntegerPageTrait;
34
    use IntegerPerPageTrait;
35
36
    /**
37
     * Popular videos resource path.
38
     *
39
     * @var string
40
     */
41
    const POPULAR_VIDEOS_RESOURCE_PATH = "/videos/popular";
42
43
    /**
44
     * Constructor.
45
     */
46
    public function __construct() {
47
        parent::__construct();
48
        $this->setPage(1);
49
        $this->setPerPage(self::PER_PAGE_DEFAULT);
50
    }
51
52
    /**
53
     * {@inheritDoc}
54
     */
55
    public function getResourcePath(): string {
56
        return self::POPULAR_VIDEOS_RESOURCE_PATH;
57
    }
58
}
59