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.

Uri   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 29
rs 10
c 1
b 0
f 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRules() 0 4 1
A getMessages() 0 4 1
A canHandle() 0 4 1
1
<?php
2
/**
3
 * Uri
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\Uri as UriValidator;
16
17
class Uri extends AbstractRule
18
{
19
    /**
20
     * {@inheritDoc}
21
     */
22
    public function getRules(ValidatorInterface $validator, ElementInterface $element = null)
23
    {
24
        return ['url' => true];
25
    }
26
27
    /**
28
     * {@inheritDoc}
29
     */
30
    public function getMessages(ValidatorInterface $validator)
31
    {
32
        return ['url' => $this->translateMessage('This is not a valid URI')];
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 UriValidator;
44
    }
45
}
46