Completed
Push — master ( 66f9bc...5c75e4 )
by Garrett
02:20
created

Factory::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace StringObject;
4
5
class Factory
6
{
7
    private $encoding;
8
9
    public function __construct($enc = StrObj::WINDOWS1252)
10
    {
11
        $this->encoding = $enc;
12
    }
13
14
    public function make($str)
15
    {
16
        return new StrObj($str, $this->encoding);
17
    }
18
}
19