Completed
Push — master ( b0612a...e62e65 )
by Pol
06:37
created

Simple   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPartitionWeight() 0 3 1
1
<?php
2
3
namespace drupol\phpartition\Algorithm;
4
5
use drupol\phpartition\BasePartitionAlgorithm;
6
use drupol\phpartition\Partition;
7
use drupol\phpartition\PartitionAlgorithmInterface;
8
9
/**
10
 * Class Simple.
11
 *
12
 * @package drupol\phpartition\Algorithm
13
 */
14
class Simple extends BasePartitionAlgorithm implements PartitionAlgorithmInterface {
15
16
  /**
17
   * {@inheritdoc}
18
   */
19 2
  public function getPartitionWeight(Partition $partition) {
20 2
    return $partition->count();
21
  }
22
23
}
24