Test Failed
Push — master ( 32d933...7151c5 )
by Gabriel
01:07 queued 15s
created

Helper::validateDescriptor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace ByTIC\Omnipay\Paylike;
4
5
/**
6
 * Class Helper
7
 * @package ByTIC\Omnipay\Paylike
8
 */
9
class Helper
10
{
11
    public static function viewsPath()
12
    {
13
        return __DIR__ . '/resources/views/';
14
    }
15
16
    /**
17
     * @param string $descriptor
18
     * @return bool
19
     */
20
    public static function validateDescriptor($descriptor){
21
        //https://github.com/paylike/descriptor#how-is-it-validated
22
        return false !== preg_match('/^[\x20-\x7E]{0,22}$/', $descriptor);
23
    }
24
}
25