Completed
Push — master ( 7790b0...e2925f )
by Alberto
16s
created

MaxPriorityToken::getPriority()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Moka\Strategy\Prophecy;
5
6
use Prophecy\Argument\ArgumentsWildcard;
7
8
/**
9
 * Class MaxPriorityToken
10
 * @package Moka\Strategy\Prophecy
11
 */
12
class MaxPriorityToken extends AbstractPriorityToken
13
{
14
    /**
15
     * @var int
16
     */
17
    private static $priority = PHP_INT_MAX;
18
19
    /**
20
     * @return int
21
     */
22 5
    protected function getPriority(): int
23
    {
24
        /**
25
         * Ensure that this matcher overrides any Prophecy token, but still cannot be overridden by subsequent
26
         * Proxy::stub() calls.
27
         *
28
         * @see ArgumentsWildcard::scoreArguments()
29
         */
30 5
        return self::$priority--;
31
    }
32
}
33