Get statistics

@link https://developer.github.com/v3/enterprise/admin_stats/#get-statistics

@param string $type

@return array
495850
public function getStatistics(string $type): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/enterprise/stats/:type', $type));
    }
226980
public function getRatings(string $type = null): PaginatedResults
    {
        if ($type !== null) {
            if (Rating::isValidRatingType($type) === false) {
                throw new InvalidArgumentException('Invalid rating type');
            }
            $json = $this->parent->performAPICallWithJsonResponse(
                'get',
                '/user/ratings/query',
                ['query' => ['itemType' => $type]]
            );
        } else {
            $json = $this->parent->performAPICallWithJsonResponse('get', '/user/ratings');
        }

        return new PaginatedResults(DataParser::parseDataArray($json, Rating::class), $this->parent->getLastLinks());
    }
843795
public function ListManagement_Get_Lists($type) {
        $ret = false;

        if (is_string($type) === true) {
            $type = rawurlencode($type);
            $ret = $this->_call_api('get', "{$this->_url}/lists/$type", array());
        }

        return $ret;
    }
628584
public function fetch($type = 'num')
    {
        $row = parent::fetch($type);
        if ($type == 'assoc' && is_array($row) && !empty($this->_driver->autoShortenedIdentifiers)) {
            //Need to preserve order of row results
            $translatedRow = [];
            foreach ($row as $key => $val) {
                if (array_key_exists($key, $this->_driver->autoShortenedIdentifiers)) {
                    $translatedRow[$this->_driver->autoShortenedIdentifiers[$key]] = $val;
                } else {
                    $translatedRow[$key] = $val;
                }
            }
            $row = $translatedRow;
        }
        return $row;
    }
727644
public function logs($type = null)
    {
        if (func_num_args()) {
            return isset($this->_logs[$type]) ? $this->_logs[$type] : [];
        }
        $logs = [];
        foreach ($this->_logs as $key => $value) {
            $logs = array_merge($logs, $value);
        }
        return $logs;
    }
750580
public function count($type = 'admin.web')
    {

        return $this->calendar
            ->scopeQuery(function ($query) use ($type) {
                return $query->where('status', '<>', 'Draft')
                    ->whereUserId(user_id($type))
                    ->whereUserType(user_type($type));
            })->count();
    }
958050
public function getAllPrivilegesByType($type)
    {
        $this->initialize();
        $privileges = [];
        foreach ($this->roles as $role) {
            $privileges = array_merge($privileges, $role->getPrivilegesByType($type));
        }
        return $privileges;
    }
1029563
protected function getSuggestedTypes($type)
    {
        $mapping = [
            'void'    => false,
            'mixed'   => false,
            'null'    => false,
            'int'     => 'int',
            'integer' => 'int',
            'string'  => 'string',
            'float'   => 'float',
            'bool'    => 'bool',
            'boolean' => 'bool',
        ];

        $typeNames = explode('|', $type);
        return array_unique(
            array_map(
                function ($typeName) use ($mapping) {
                    if (isset($mapping[$typeName])) {
                        return $mapping[$typeName];
                    }

                    if ($this->isTypeArray($typeName)) {
                        return 'array';
                    }

                    if ($this->isTypeCallable($typeName)) {
                        return 'callable';
                    }

                    if ($this->isTypeObject($typeName)) {
                        return $typeName;
                    }

                    return false;
                },
                $typeNames
            )
        );
    }
69820
public function get($type = null)
    {
        if (!$type) {
            return $this->messages;
        }

        if (isset($this->messages[$type])) {
            return $this->messages[$type];
        }

        return [];
    }
1178284
public function getStatistics()
    {
        if (false === $this->getCommitsHaveBeenParsed()) {
            $this->getCommits();
        }

        foreach ($this->statistics as $statistic) {
            $statistic->sortCommits();
        }

        return $this->statistics;
    }
745217
protected function returnData($type)
    {
        $data = ['result' => $type];
        if ( $this->hasPhoto ){
            $data['photos'] = $this->repo->files;
        }
        if ( $this->hasFile ) {
            $data['files'] = $this->repo->files;
        }
        return $data;
    }
551729
public function getTypeOperations( string $type ): array {
		return array_intersect_key(
			$this->getArrayCopy(),
			array_flip( $this->typePointers[$type] )
		);
	}
927116
public function get(string $type): array
    {
        if (isset($this->messages[$type])) {
            $messages = $this->messages[$type];

            // Clear messages
            $this->clear($type);

            return $messages;
        } else {
            return [];
        }
    }
1300602
private function getPaths($type)
    {
        $typeConfigs = $this->typePaths[$type];
        $paths = [];

        foreach ($typeConfigs as $typeConfig) {
            $paths[] = $typeConfig['path'];
        }

        return $paths;
    }
21267
protected function getLevelByType($type)
    {
        $level = 0;

        if (isset($this->availableLogtypes[$type])) {
            $level = $this->availableLogtypes[$type];
        }

        return $level;
    }
528208
public function getType($type)
    {
        $aliases = array(
            'int'    => 'integer',
            'bool'   => 'boolean',
            'double' => 'float',
            'object' => '\\stdClass'
        );
        $default = array(
            'integer', 'boolean', 'float', '\\stdClass', 'callable', 'string', 'resource', 'void', 'mixed'
        );
        $typeHintEnabled = false;

        if (isset($aliases[$type])) {
            $type = $aliases[$type];
        }

        if (!in_array($type, $default)) {
            $typeHintEnabled = true;
        }

        return array(
            'name' => $type,
            'hint' => $typeHintEnabled
        );
    }
206873
public function fetchAll($type = parent::FETCH_TYPE_NUM)
    {
        return array_map($this->_callback, $this->_statement->fetchAll($type));
    }