GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

CreditCard::getRules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/**
3
 * CreditCard
4
 *
5
 * @category  StrokerForm
6
 * @package   StrokerForm\Renderer
7
 * @copyright 2012 Bram Gerritsen
8
 * @version   SVN: $Id$
9
 */
10
11
namespace StrokerForm\Renderer\JqueryValidate\Rule;
12
13
use Zend\Form\ElementInterface;
14
use Zend\Validator\ValidatorInterface;
15
use Zend\Validator\CreditCard as CreditCardValidator;
16
17
class CreditCard extends AbstractRule
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function getRules(ValidatorInterface $validator, ElementInterface $element = null)
23
    {
24
        return ['creditcard' => true];
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function getMessages(ValidatorInterface $validator)
31
    {
32
        return ['creditcard' => $this->translateMessage('The creditcard number is invalid')];
33
    }
34
35
    /**
36
     * Whether this rule supports certain validators
37
     *
38
     * @param ValidatorInterface $validator
39
     * @return mixed
40
     */
41
    public function canHandle(ValidatorInterface $validator)
42
    {
43
        return $validator instanceof CreditCardValidator;
44
    }
45
}
46