Completed
Push — master ( df80f0...840f28 )
by Rafal
11s
created

WinExact::getScore()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace App\GameBetting\Business\GamePoints\Score;
4
5
use App\GameBetting\Business\GamePoints\Config;
6
use App\GameBetting\Persistence\DataProvider\Result;
7
8
class WinExact implements ScoreInterface
9
{
10
    /**
11
     * @return int
12
     */
13
    public function getScore() : int
14
    {
15
        return Config::WIN_EXACT;
16
    }
17
18
    /**
19
     * @param Result $result
20
     * @return bool
21
     */
22
    public function check(Result $result): bool
23
    {
24
        return $result->getFirstTeamUserResult() === $result->getFirstTeamResult()
25
            && $result->getSecondTeamUserResult() === $result->getSecondTeamResult();
26
    }
27
}