Test Failed
Push — master ( 470d4b...33c92c )
by Terzi
04:31
created

src/Chain.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Terranet\Administrator;
4
5
class Chain
6
{
7
    /**
8
     * Create chain of responsibility.
9
     *
10
     * @param array $queue
11
     */
12
    public static function make(array $queue = [])
13
    {
14
        foreach ($queue as $i => &$instance) {
15
            if ($next = array_get($queue, $i + 1)) {
0 ignored issues
show
The function array_get was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
            if ($next = /** @scrutinizer ignore-call */ array_get($queue, $i + 1)) {
Loading history...
16
                $instance->setNext($next);
17
            }
18
        }
19
20
        return array_first($queue);
0 ignored issues
show
The function array_first was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
        return /** @scrutinizer ignore-call */ array_first($queue);
Loading history...
21
    }
22
}
23