ConnectionLessSocketSpecification   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isSatisfiedBy() 0 5 2
1
<?php
2
/**
3
 * Async sockets
4
 *
5
 * @copyright Copyright (c) 2015-2017, Efimov Evgenij <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
namespace AsyncSockets\RequestExecutor\Specification;
11
12
use AsyncSockets\Operation\ReadOperation;
13
use AsyncSockets\RequestExecutor\Metadata\RequestDescriptor;
14
use AsyncSockets\Socket\UdpClientSocket;
15
16
/**
17
 * Class ConnectionLessSocketSpecification
18
 */
19
class ConnectionLessSocketSpecification implements SpecificationInterface
20
{
21
    /** {@inheritdoc} */
22 125
    public function isSatisfiedBy(RequestDescriptor $requestDescriptor)
23
    {
24 125
        return $requestDescriptor->getSocket() instanceof UdpClientSocket &&
25 125
               $requestDescriptor->getOperation() instanceof ReadOperation;
26
    }
27
}
28