Completed
Push — master ( 8c892e...6a431f )
by Pol
11:58
created

Simple::getSubsetWeight()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace drupol\phpartition\Algorithm;
4
5
use drupol\phpartition\BasePartitionAlgorithm;
6
use drupol\phpartition\PartitionAlgorithmInterface;
7
use drupol\phpartition\Subset;
8
9
/**
10
 * Class Simple.
11
 *
12
 * @package drupol\phpartition\Algorithm
13
 */
14
class Simple extends BasePartitionAlgorithm implements PartitionAlgorithmInterface {
15
16
  /**
17
   * @param \drupol\phpartition\Subset $subset
18
   *
19
   * @return int
20
   */
21
  public function getSubsetWeight(Subset $subset) {
22
    return count($subset->getItems());
23
  }
24
25
}