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

donatj / mock-webserver / 15544212778

09 Jun 2025 08:42PM UTC coverage: 78.841% (-1.4%) from 80.24%
15544212778

push

github

web-flow
Merge pull request #61 from donatj/feature/phpstan

Add phpstan to ci

5 of 12 new or added lines in 4 files covered. (41.67%)

1 existing line in 1 file now uncovered.

272 of 345 relevant lines covered (78.84%)

4.26 hits per line

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

0.0
/server/server.php
1
<?php
2

3
use donatj\MockWebServer\MockWebServer;
4

5
$files = [
×
6
        __DIR__ . '/../vendor/autoload.php',
×
7
        __DIR__ . '/../../../autoload.php',
×
8
];
×
9
foreach( $files as $file ) {
×
10
        if( file_exists($file) ) {
×
11
                require_once $file;
×
12
                break;
×
13
        }
14
}
15

16
$INPUT   = file_get_contents("php://input");
×
NEW
17
if( $INPUT === false ) {
×
NEW
18
        throw new RuntimeException('Failed to read php://input');
×
19
}
20

UNCOV
21
$HEADERS = getallheaders();
×
22

23
$tmp = getenv(MockWebServer::TMP_ENV);
×
NEW
24
if( $tmp === false || $tmp === '' ) {
×
NEW
25
        throw new RuntimeException('Environment variable ' . MockWebServer::TMP_ENV . ' is not set');
×
26
}
27

28
$r      = new \donatj\MockWebServer\RequestInfo($_SERVER, $_GET, $_POST, $_FILES, $_COOKIE, $HEADERS, $INPUT);
×
29
$server = new \donatj\MockWebServer\InternalServer($tmp, $r);
×
30

31
$server();
×
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