BaseReports::sleepToNotOverDoApiLimits()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace AlfredNutileInc\HPClient\Reports;
3
4
use Facades\AlfredNutileInc\HPClient\ResourceApi;
5
6
class BaseReports
7
{
8
9
    protected $resources = [];
10
11
    public function getResourcesFromApi()
12
    {
13
        $this->resources = ResourceApi::getResources();
14
    }
15
16
    protected function sleepToNotOverDoApiLimits()
17
    {
18
        if (!\App::environment("testing")) {
19
            sleep(3); //api limits
20
        }
21
    }
22
}
23