TraverseEnd   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
A getNth() 0 4 1
1
<?php
2
3
namespace Solidifier\Events;
4
5
use Solidifier\Event;
6
7
class TraverseEnd extends Event
8
{
9
    const
10
        EVENT_NAME = 'traverse.end';
11
    
12
    private
13
        $nth;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $nth.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
14
    
15
    public function __construct($nth = 1)
16
    {
17
        $this->nth = 1;
18
        
19
        if(is_int($nth))
20
        {
21
            $this->nth = $nth;
22
        }
23
    }
24
    
25
    public function getNth()
26
    {
27
        return $this->nth;
28
    }
29
}