GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Regex::match()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Spatie\Regex;
4
5
class Regex
6
{
7
    /**
8
     * @param string $pattern
9
     * @param string $subject
10
     *
11
     * @return \Spatie\Regex\MatchResult
12
     */
13
    public static function match(string $pattern, string $subject): MatchResult
14
    {
15
        return MatchResult::for($pattern, $subject);
16
    }
17
18
    /**
19
     * @param string $pattern
20
     * @param string $subject
21
     *
22
     * @return \Spatie\Regex\MatchAllResult
23
     */
24
    public static function matchAll(string $pattern, string $subject): MatchAllResult
25
    {
26
        return MatchAllResult::for($pattern, $subject);
27
    }
28
29
    /**
30
     * @param string|array $pattern
31
     * @param string|array|callable $replacement
32
     * @param string|array $subject
33
     * @param int $limit
34
     *
35
     * @return \Spatie\Regex\ReplaceResult
36
     */
37
    public static function replace($pattern, $replacement, $subject, $limit = -1): ReplaceResult
38
    {
39
        return ReplaceResult::for($pattern, $replacement, $subject, $limit);
40
    }
41
}
42