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::extractFirstInteger()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
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