Completed
Pull Request — master (#110)
by Charlotte
24:37
created

MessageFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
    public function __construct(array $config = [])
24
    {
25
        $this->config = $config;
26
    }
27
28
    /**
29
     * @return Message
30
     */
31
    public function create()
32
    {
33
        return new Message($this->config);
34
    }
35
}
36