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 — master ( 385c39...d9c1b5 )
by Xaf
14:32 queued 08:22
created

CupsTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testHasNormalLength() 0 8 1
A cupsList() 0 6 1
1
<?php
2
3
namespace Tests;
4
5
use CupsGenerator\Cups;
6
use CupsValidate\Cups as CupsValidator;
7
8
/**
9
 * Cups generator test.
10
 *
11
 * @link https://es.wikipedia.org/wiki/C%C3%B3digo_Unificado_de_Punto_de_Suministro
12
 */
13
class CupsTest extends \PHPUnit_Framework_TestCase
14
{
15
    public function testHasNormalLength()
16
    {
17
        $cupsList = $this->cupsList();
18
19
        array_walk($cupsList, function($cups) {
20
            $this->assertTrue(CupsValidator::validate($cups));
21
        });
22
    }
23
24
     private function cupsList()
25
     {
26
        return array_map(function() {
27
            return (new Cups())->generate();
28
        }, range(1,50));
29
     }
30
}
31