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

MichaelJ2324 / PHP-REST-Client / 12773481820

14 Jan 2025 05:53PM UTC coverage: 91.889% (-0.3%) from 92.151%
12773481820

push

github

MichaelJ2324
Abstract Default Endpoints setup + Allow for Versioned Endpoint Name mapping

1 of 6 new or added lines in 3 files covered. (16.67%)

997 of 1085 relevant lines covered (91.89%)

1.46 hits per line

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

0.0
/src/Endpoint/Provider/DefaultEndpointsTrait.php
1
<?php
2

3
namespace MRussell\REST\Endpoint\Provider;
4

5
trait DefaultEndpointsTrait
6
{
7
    /**
8
     * List of default endpoints to load
9
     */
10
    protected static array $_DEFAULT_ENDPOINTS = [];
11

NEW
12
    protected function registerDefaultEndpoints(): void
×
13
    {
NEW
14
        foreach (static::$_DEFAULT_ENDPOINTS as $i => $epData) {
×
NEW
15
            $name = $epData[AbstractEndpointProvider::ENDPOINT_NAME] ?? $i;
×
NEW
16
            $this->registerEndpoint($name, $epData[AbstractEndpointProvider::ENDPOINT_CLASS], $epData[AbstractEndpointProvider::ENDPOINT_PROPERTIES] ?? []);
×
17
        }
18
    }
19
}
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

© 2025 Coveralls, Inc