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

MaxPriorityToken   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 21
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPriority() 0 10 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