Code Duplication    Length = 12-12 lines in 2 locations

src/PeopleMatter.php 2 locations

@@ 88-99 (lines=12) @@
85
        return "https://{$this->host}/api/{$resource}";
86
    }
87
88
    public function getBusinessUnits()
89
    {
90
        $this->login();
91
        $response = $this->request('GET', $this->buildUrl("businessunit?businessalias={$this->alias}"));
92
93
        $units = [];
94
        foreach ($response["Records"] as $unit) {
95
            $units[] = new BusinessUnit($unit);
96
        }
97
98
        return $units;
99
    }
100
101
    public function getJobs()
102
    {
@@ 101-112 (lines=12) @@
98
        return $units;
99
    }
100
101
    public function getJobs()
102
    {
103
        $this->login();
104
        $response = $this->request('GET', $this->buildUrl("job?businessalias={$this->alias}"));
105
106
        $jobs = [];
107
        foreach ($response["Jobs"] as $unit) {
108
            $jobs[] = new Job($unit);
109
        }
110
111
        return $jobs;
112
    }
113
114
    public function getPerson($email)
115
    {