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

pixelpeter / laravel5-genderize-api-client / 14985190504

13 May 2025 12:11AM UTC coverage: 98.925%. Remained the same
14985190504

Pull #24

github

web-flow
Merge a3261ca8c into 9ab08af06
Pull Request #24: Bump dependabot/fetch-metadata from 2.3.0 to 2.4.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/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)
24✔
21
    {
22
        $this->code = (int) $data->code;
24✔
23
        $this->limit = (int) $data->headers['x-rate-limit-limit'];
24✔
24
        $this->remaining = (int) $data->headers['x-rate-limit-remaining'];
24✔
25
        $this->reset = $this->setDate($data);
24✔
26
    }
24✔
27

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

35
        return $date->addSeconds($data->headers['x-rate-reset']);
24✔
36
    }
37
}
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