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.
Completed
Push — dev ( fb9f08...0e0077 )
by Андрей
10:45 queued 05:08
created

Validator   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 8 4
1
<?php
2
/**
3
 * @link    https://github.com/old-town/old-town-workflow
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTownWorkflowBehatTestData\VariableResolver;
7
8
use OldTown\PropertySet\PropertySetInterface;
9
use OldTown\Workflow\TransientVars\TransientVarsInterface;
10
use OldTown\Workflow\ValidatorInterface;
11
use OldTown\Workflow\Exception\InvalidInputException;
12
13
/**
14
 * Class Validator
15
 *
16
 * @package OldTownWorkflowBehatTestData\VariableResolver
17
 */
18
class Validator implements ValidatorInterface
19
{
20
    /**
21
     * @param TransientVarsInterface $transientVars
22
     * @param array                  $args
23
     * @param PropertySetInterface   $ps
24
     *
25
     * @return bool
26
     */
27
    public function validate(TransientVarsInterface $transientVars, array $args = [], PropertySetInterface $ps)
28
    {
29
        if (array_key_exists('expected', $args) && array_key_exists('actual', $args) && $args['expected'] === $args['actual']) {
30
            return true;
31
        }
32
33
        throw new InvalidInputException('Ivalid data');
34
    }
35
}
36