DataClasses::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ridvanbaluyos\Pwned;
4
5
use \Ridvanbaluyos\Pwned\Pwned as Pwned;
6
/**
7
 * Getting all data classes in the system
8
 * https://haveibeenpwned.com/API/v2#AllDataClasses
9
 *
10
 * @package    Pwned
11
 * @author     Ridvan Baluyos <[email protected]>
12
 * @link       https://github.com/ridvanbaluyos/haveibeenpwned
13
 * @license    MIT
14
 */
15
class DataClasses extends Pwned
16
{
17
    /**
18
     * DataClasses constructor.
19
     */
20
    public function __construct()
21
    {
22
        parent::__construct();
23
    }
24
25
    /**
26
     * This function gets all data classes.
27
     *
28
     * @return array
29
     */
30
    public function get(): array
31
    {
32
        $url = $this->endpoint . 'dataclasses';
33
        $dataClasses = $this->requestGet($url);
34
35
        return $dataClasses;
36
    }
37
}