AdminStats::getStatistics()   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
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace FlexyProject\GitHub\Receiver\Enterprise;
3
4
/**
5
 * The Admin Stats API provides a variety of metrics about your installation.
6
 *
7
 * @link    https://developer.github.com/v3/enterprise/admin_stats/
8
 * @package GitHub\Receiver\Enterprise
9
 */
10
class AdminStats extends AbstractEnterprise
11
{
12
13
    /**
14
     * Get statistics
15
     *
16
     * @link https://developer.github.com/v3/enterprise/admin_stats/#get-statistics
17
     *
18
     * @param string $type
19
     *
20
     * @return array
21
     */
22
    public function getStatistics(string $type): array
23
    {
24
        return $this->getApi()->request($this->getApi()->sprintf('/enterprise/stats/:type', $type));
25
    }
26
}