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

MyIntervals / PHP-CSS-Parser / 21368959380

26 Jan 2026 06:20PM UTC coverage: 68.879% (-2.4%) from 71.315%
21368959380

Pull #1482

github

web-flow
Merge 8ea6bbfde into 416f6a7fe
Pull Request #1482: Remove `thecodingmachine/safe` dependency

0 of 71 new or added lines in 5 files covered. (0.0%)

1432 of 2079 relevant lines covered (68.88%)

29.59 hits per line

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

0.0
/src/Safe/Exceptions/PcreException.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Sabberworm\CSS\Safe\Exceptions;
6

7
class PcreException extends \Exception implements SafeExceptionInterface
8
{
NEW
9
    public static function createFromPhpError(): self
×
NEW
10
    {
×
NEW
11
        $errorMap = [
×
NEW
12
            PREG_INTERNAL_ERROR => 'PREG_INTERNAL_ERROR: Internal error',
×
NEW
13
            PREG_BACKTRACK_LIMIT_ERROR => 'PREG_BACKTRACK_LIMIT_ERROR: Backtrack limit reached',
×
NEW
14
            PREG_RECURSION_LIMIT_ERROR => 'PREG_RECURSION_LIMIT_ERROR: Recursion limit reached',
×
NEW
15
            PREG_BAD_UTF8_ERROR => 'PREG_BAD_UTF8_ERROR: Invalid UTF8 character',
×
NEW
16
            PREG_BAD_UTF8_OFFSET_ERROR => 'PREG_BAD_UTF8_OFFSET_ERROR',
×
NEW
17
            PREG_JIT_STACKLIMIT_ERROR => 'PREG_JIT_STACKLIMIT_ERROR',
×
NEW
18
        ];
×
NEW
19
        $errMsg = $errorMap[\preg_last_error()] ?? 'Unknown PCRE error: ' . \preg_last_error();
×
20

NEW
21
        return new self($errMsg, \preg_last_error());
×
NEW
22
    }
×
23
}
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