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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A match() 0 4 1
A matchAll() 0 4 1
A replace() 0 4 1
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