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

StringTrait::integerToSpace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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