Completed
Push — master ( d7f2fe...303bad )
by Taosikai
11:51
created

ServerTimer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getServer() 0 4 1
A isPeriodic() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the slince/spike package.
5
 *
6
 * (c) Slince <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Spike\Server\Timer;
13
14
use Spike\Common\Timer\TimerInterface;
15
use Spike\Server\Server;
16
17
abstract class ServerTimer implements TimerInterface
18
{
19
    /**
20
     * @var Server
21
     */
22
    protected $server;
23
24
    public function __construct(Server $server)
25
    {
26
        $this->server = $server;
27
    }
28
29
    /**
30
     * @return Server
31
     */
32
    public function getServer()
33
    {
34
        return $this->server;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function isPeriodic()
41
    {
42
        return true;
43
    }
44
}