Passed
Push — master ( e84b60...ced1eb )
by Antonio Carlos
03:21
created

QRCode::setAllowInsecureCallToGoogleApis()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace PragmaRX\Google2FA\Support;
4
5
use PragmaRX\Google2FA\Exceptions\InsecureCallException;
0 ignored issues
show
Bug introduced by
The type PragmaRX\Google2FA\Excep...s\InsecureCallException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
trait QRCode
8
{
9
    /**
10
     * Creates a QR code url.
11
     *
12
     * @param $company
13
     * @param $holder
14
     * @param $secret
15
     *
16
     * @return string
17
     */
18
    public function getQRCodeUrl($company, $holder, $secret)
19
    {
20
        return 'otpauth://totp/'.rawurlencode($company).':'.rawurlencode($holder).'?secret='.$secret.'&issuer='.rawurlencode($company).'';
21
    }
22
}
23