Completed
Push — master ( 104e68...b4839f )
by Maxime
12s
created

MessageFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 4 1
1
<?php
2
/**
3
 * This file is a part of Woketo package.
4
 *
5
 * (c) Nekland <[email protected]>
6
 *
7
 * For the full license, take a look to the LICENSE file
8
 * on the root directory of this project
9
 */
10
11
namespace Nekland\Woketo\Rfc6455;
12
13
14
class MessageFactory
15
{
16
    /**
17
     * Configuration for Message objects.
18
     * 
19
     * @var array
20
     */
21
    private $config;
22
    
23 22
    public function __construct(array $config = [])
24
    {
25 22
        $this->config = $config;
26 22
    }
27
28
    /**
29
     * @return Message
30
     */
31 14
    public function create()
32
    {
33 14
        return new Message($this->config);
34
    }
35
}
36