AdminStats   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getStatistics() 0 4 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
}