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

mlocati / PayWay / 5213927880

pending completion
5213927880

push

github

mlocati
Initial version

1803 of 1803 new or added lines in 47 files covered. (100.0%)

1313 of 1803 relevant lines covered (72.82%)

1.53 hits per line

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

71.43
/src/Service/StringList.php
1
<?php
2

3
namespace MLocati\PayWay\Service;
4

5
use RuntimeException;
6

7
abstract class StringList
8
{
9
    /**
10
     * @var string[]|null
11
     */
12
    protected static $list;
13

14
    /**
15
     * @return array
16
     */
17
    public static function getList()
18
    {
19
        if (static::$list === null) {
4✔
20
            $list = include __DIR__ . '/../data/' . static::getListFile();
1✔
21
            if (!is_array($list)) {
1✔
22
                throw new RuntimeException('Failed to retrieve the list');
×
23
            }
24
            static::$list = $list;
1✔
25
        }
26

27
        return static::$list;
4✔
28
    }
29

30
    /**
31
     * @param string|mixed $code
32
     *
33
     * @return bool
34
     */
35
    public static function isValid($code)
36
    {
37
        return in_array($code, static::getList(), true);
×
38
    }
39
}
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