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 ( bd74f9...c38dae )
by Daniel
09:23
created

LoopOneHundredThousandItems   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A benchCollectionArray() 0 6 1
A benchForeachArray() 0 7 2
1
<?php
2
declare(strict_types=1);
3
namespace Narrowspark\Collection;
4
5
use Narrowspark\Collection\Collection;
6
7
class LoopOneHundredThousandItems
8
{
9
    /**
10
     * @Revs(10)
11
     */
12
    public function benchCollectionArray()
13
    {
14
        $collection = Collection::from(range(0, 100000));
15
        $collection->each(function ($i) {
0 ignored issues
show
Unused Code introduced by
The parameter $i is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
16
        });
17
    }
18
19
    public function benchForeachArray()
20
    {
21
        $array = range(0, 100000);
22
23
        foreach ($array as $i) {
0 ignored issues
show
Unused Code introduced by
This foreach statement is empty and can be removed.

This check looks for foreach loops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.

Consider removing the loop.

Loading history...
24
        }
25
    }
26
}
27