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

pixelpeter / laravel-genderize-api-client / 16567649557

28 Jul 2025 11:20AM UTC coverage: 100.0%. Remained the same
16567649557

Pull #34

github

web-flow
Merge 88ea5c63d into 8a0d5467f
Pull Request #34: Bump aglipanci/laravel-pint-action from 2.5 to 2.6

92 of 92 relevant lines covered (100.0%)

43.04 hits per line

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

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

3
namespace Pixelpeter\Genderize\Models;
4

5
use Carbon\Carbon;
6

7
class Meta extends BaseModel
8
{
9
    protected $code;
10

11
    protected $limit;
12

13
    protected $remaining;
14

15
    protected $reset;
16

17
    /**
18
     * Create new instance of Meta model
19
     */
20
    public function __construct($data)
40✔
21
    {
22
        $headers = array_change_key_case($data->headers, CASE_LOWER);
40✔
23

24
        $this->code = (int) $data->code;
40✔
25
        $this->limit = (int) $headers['x-rate-limit-limit'];
40✔
26
        $this->remaining = (int) $headers['x-rate-limit-remaining'];
40✔
27
        $this->reset = $this->setDate($headers['x-rate-limit-reset']);
40✔
28
    }
29

30
    /**
31
     * Set remaining seconds till reset as Carbon instance
32
     */
33
    protected function setDate($data)
40✔
34
    {
35
        $date = Carbon::now();
40✔
36

37
        return $date->addSeconds((int) $data);
40✔
38
    }
39
}
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