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

Helper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A viewsPath() 0 3 1
A validateDescriptor() 0 3 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