Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — add-update-command ( 60d3c1...c664f4 )
by Pedro
14:19
created

ExtractsFirstInteger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A extractFirstInteger() 0 7 2
1
<?php
2
3
namespace Backpack\CRUD\app\Console\Commands\Upgrade\Concerns;
4
5
trait ExtractsFirstInteger
6
{
7
    /**
8
     * Extract the first integer occurrence from the given string.
9
     */
10
    protected function extractFirstInteger(string $value): ?int
11
    {
12
        if (preg_match('/(\d+)/', $value, $matches)) {
13
            return (int) $matches[1];
14
        }
15
16
        return null;
17
    }
18
}
19