Completed
Push — master ( 181359...3492c7 )
by Sergey
49s
created

News   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A all() 0 6 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Providers;
4
5
use seregazhuk\PinterestBot\Api\Traits\HasFeed;
6
use seregazhuk\PinterestBot\Helpers\UrlBuilder;
7
8
class News extends Provider
9
{
10
    use HasFeed;
11
12
    /**
13
     * @var array
14
     */
15
    protected $loginRequiredFor = [
16
        'last',
17
        'all',
18
    ];
19
20
    /**
21
     * @param int $limit
22
     * @return mixed
23
     */
24
    public function all($limit = 0)
25
    {
26
        $data = ['allow_stale' => true];
27
28
        return $this->getFeed($data, UrlBuilder::RESOURCE_GET_LATEST_NEWS, $limit);
29
    }
30
}
31