Completed
Push — master ( a92ee2...268555 )
by Dmitry
04:05
created

CountableMethods   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A count() 0 3 1
1
<?php
2
3
namespace PHPKitchen\Platform\Struct\Mixin;
4
5
/**
6
 * Represents implementation of countable interface for collections.
7
 *
8
 * @property array $elements data storage.
9
 *
10
 * @author Dmitry Kolodko <[email protected]>
11
 * @since 1.0
12
 */
13
trait CountableMethods {
14
    /**
15
     * Count elements of an object
16
     *
17
     * @link http://php.net/manual/en/countable.count.php
18
     * @return int count of elements.
19
     *
20
     * @since 1.0
21
     */
22
    public function count() {
23
        return count($this->elements);
24
    }
25
}