Completed
Push — master ( 8c9478...0f7d17 )
by Adam
02:25
created

StringTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A integerToSpace() 0 4 1
1
<?php
2
3
namespace BestServedCold\PhalueObjects\VOString;
4
5
use BestServedCold\PhalueObjects\Mathematical\Integer;
6
7
/**
8
 * Class StringTrait
9
 *
10
 * @package   BestServedCold\PhalueObjects\String
11
 * @author    Adam Lewis <[email protected]>
12
 * @copyright Copyright (c) 2015 Best Served Cold Media Limited
13
 * @license   http://http://opensource.org/licenses/GPL-3.0 GPL License
14
 * @link      http://bestservedcold.com
15
 * @since     0.0.1-alpha
16
 * @version   0.0.2-alpha
17
 */
18
trait StringTrait
19
{
20
    /**
21
     * @param  Integer $spaces
22
     * @return string
23
     */
24 1
    public function integerToSpace($spaces)
25
    {
26 1
        return str_pad('', $spaces->getValue());
27
    }
28
}
29