ServiceCallback   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 28
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
callback() 0 1 ?
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the PHP Generics package.
5
 *
6
 * @package Generics
7
 */
8
namespace Generics\Socket;
9
10
/**
11
 * This abstract class is the blueprint for implementing a service callback
12
 *
13
 * @author Maik <[email protected]>
14
 *
15
 */
16
abstract class ServiceCallback
17
{
18
19
    /**
20
     * Endpoint
21
     *
22
     * @var Endpoint endpoint
23
     */
24
    private $serviceEndpoint;
25
26
    /**
27
     * Create a new service callback instance
28
     *
29
     * @param Endpoint $endPoint
30
     *            The endpoint
31
     */
32
    public function __construct(Endpoint $endPoint)
33
    {
34
        $this->serviceEndpoint = $endPoint;
35
    }
36
37
    /**
38
     * Any implementor must provide such a functions
39
     *
40
     * @return boolean true in case of service should keep on running, false if it shall stop
41
     */
42
    abstract public function callback(Socket $socket);
43
}
44