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

pixelpeter / laravel5-genderize-api-client / 15701686167

17 Jun 2025 08:06AM UTC coverage: 98.925%. Remained the same
15701686167

push

github

web-flow
Bump stefanzweifel/git-auto-commit-action from 5 to 6 (#25)

Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 6.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

92 of 93 relevant lines covered (98.92%)

13.06 hits per line

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

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

3
namespace Pixelpeter\Genderize\Models;
4

5
class Name extends BaseModel
6
{
7
    protected $gender;
8

9
    protected $name;
10

11
    protected $probability;
12

13
    protected $count;
14

15
    /**
16
     * Create new instance of Name model
17
     */
18
    public function __construct($data)
27✔
19
    {
20
        $data = $this->prepareData($data);
27✔
21

22
        $this->name = $data->name;
27✔
23
        $this->gender = $data->gender;
27✔
24
        $this->probability = $data->probability;
27✔
25
        $this->count = $data->count;
27✔
26
    }
27✔
27

28
    /**
29
     * Merge data with default so every field is available
30
     *
31
     * @return object
32
     */
33
    protected function prepareData($data)
27✔
34
    {
35
        $default = new \StdClass;
27✔
36
        $default->name = null;
27✔
37
        $default->gender = null;
27✔
38
        $default->probability = null;
27✔
39
        $default->count = null;
27✔
40

41
        return (object) array_merge(
27✔
42
            (array) $default,
27✔
43
            (array) $data
27✔
44
        );
45
    }
46

47
    /**
48
     * Check if name is male
49
     *
50
     * @return bool
51
     */
52
    public function isMale()
3✔
53
    {
54
        return $this->gender === 'male';
3✔
55
    }
56

57
    /**
58
     * Check if name is not male
59
     *
60
     * @return bool
61
     */
62
    public function isNotMale()
3✔
63
    {
64
        return $this->gender !== 'male';
3✔
65
    }
66

67
    /**
68
     * Check if name is female
69
     *
70
     * @return bool
71
     */
72
    public function isFemale()
3✔
73
    {
74
        return $this->gender === 'female';
3✔
75
    }
76

77
    /**
78
     * Check if name is not female
79
     *
80
     * @return bool
81
     */
82
    public function isNotFemale()
3✔
83
    {
84
        return $this->gender !== 'female';
3✔
85
    }
86
}
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