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

keradus / PHP-CS-Fixer / 17252691116

26 Aug 2025 11:09PM UTC coverage: 94.743% (-0.01%) from 94.755%
17252691116

push

github

keradus
chore: apply phpdoc_tag_no_named_arguments

28313 of 29884 relevant lines covered (94.74%)

45.64 hits per line

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

85.71
/src/PharChecker.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of PHP CS Fixer.
7
 *
8
 * (c) Fabien Potencier <fabien@symfony.com>
9
 *     Dariusz RumiƄski <dariusz.ruminski@gmail.com>
10
 *
11
 * This source file is subject to the MIT license that is bundled
12
 * with this source code in the file LICENSE.
13
 */
14

15
namespace PhpCsFixer;
16

17
/**
18
 * @internal
19
 *
20
 * @no-named-arguments Parameter names are not covered by the backward compatibility promise.
21
 */
22
final class PharChecker implements PharCheckerInterface
23
{
24
    public function checkFileValidity(string $filename): ?string
25
    {
26
        try {
27
            $phar = new \Phar($filename);
2✔
28
            // free the variable to unlock the file
29
            unset($phar);
1✔
30
        } catch (\Exception $e) {
1✔
31
            if (!$e instanceof \UnexpectedValueException && !$e instanceof \PharException) {
1✔
32
                throw $e;
×
33
            }
34

35
            return 'Failed to create Phar instance. '.$e->getMessage();
1✔
36
        }
37

38
        return null;
1✔
39
    }
40
}
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