• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pixelpeter / laravel5-genderize-api-client / 14201248013

01 Apr 2025 04:42PM UTC coverage: 98.925%. First build
14201248013

Pull #23

github

web-flow
Merge 3bdc620a8 into 85903ddbb
Pull Request #23: ADD: github actions

8 of 8 new or added lines in 4 files covered. (100.0%)

92 of 93 relevant lines covered (98.92%)

26.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Models/GenderizeResponse.php
1
<?php
2

3
namespace Pixelpeter\Genderize\Models;
4

5
use Illuminate\Support\Collection;
6

7
class GenderizeResponse extends BaseModel
8
{
9
    protected $meta;
10

11
    protected $result;
12

13
    public function __construct($response)
18✔
14
    {
15
        $this->result = $this->setResult($response);
18✔
16
        $this->meta = $this->setMeta($response);
18✔
17
    }
18✔
18

19
    protected function setMeta($data)
18✔
20
    {
21
        return new Meta($data);
18✔
22
    }
23

24
    protected function setResult($response)
18✔
25
    {
26
        if (is_array($response->body)) {
18✔
27
            return $this->returnWithCollection($response);
6✔
28
        }
29

30
        return new Name($response->body);
12✔
31
    }
32

33
    protected function returnWithCollection($response)
6✔
34
    {
35
        $collection = new Collection;
6✔
36

37
        foreach ($response->body as $row) {
6✔
38
            $collection->push(new Name($row));
6✔
39
        }
40

41
        return $collection;
6✔
42
    }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc