Passed
Push — 1.x ( 36b118...cb0b9f )
by Ulises Jeremias
02:31
created

Countable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A count() 0 3 1
1
<?php namespace Mbh\Collection\Traits\Sequenceable\LinkedList;
2
3
/**
4
 * MBHFramework
5
 *
6
 * @link      https://github.com/MBHFramework/mbh-framework
7
 * @copyright Copyright (c) 2017 Ulises Jeremias Cornejo Fandos
8
 * @license   https://github.com/MBHFramework/mbh-framework/blob/master/LICENSE (MIT License)
9
 */
10
11
use Traversable;
12
13
trait Countable
14
{
15
    /**
16
     * @link http://php.net/manual/en/countable.count.php
17
     * @return int
18
     */
19
    public function count(): int
20
    {
21
        return $this->getSize();
22
    }
23
24
    abstract protected function getSize();
25
}
26