Completed
Push — master ( d10f8a...114a35 )
by Jakub
03:42
created

StaticSuccessCalculator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A calculateHealingSuccessChance() 0 2 1
A hasHit() 0 2 1
A calculateHitChance() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace HeroesofAbenez\Combat;
5
6
/**
7
 * StaticSuccessCalculator
8
 *
9
 * @author Jakub Konečný
10
 */
11 1
final class StaticSuccessCalculator implements ISuccessCalculator {
12
  public function calculateHitChance(Character $character1, Character $character2, ?CharacterAttackSkill $skill = NULL): int {
0 ignored issues
show
introduced by
Line exceeds 120 characters; contains 126 characters
Loading history...
13 1
    return 100;
14
  }
15
  
16
  public function calculateHealingSuccessChance(Character $healer): int {
17 1
    return 100;
18
  }
19
  
20
  public function hasHit(int $hitChance): bool {
21 1
    return true;
22
  }
23
}
24
?>