Completed
Push — master ( 2aea27...e8d42f )
by Nicolai
04:56 queued 02:51
created

Template   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getBaseTestClass() 0 4 1
1
<?php
2
3
4
namespace SmartWeb\ModuleTesting\Util;
5
6
use Illuminate\Support\Str;
7
use SmartWeb\ModuleTesting\Generator\CodeceptionTestType;
8
9
10
/**
11
 * Class Template
12
 *
13
 * @package SmartWeb\ModuleTesting\Util
14
 */
15
final class Template
16
{
17
    
18
    /**
19
     * @inheritDoc
20
     */
21
    private function __construct()
22
    {
23
    }
24
    
25
    /**
26
     * @param string              $suite
27
     * @param CodeceptionTestType $type
28
     * @param string              $prefix
29
     *
30
     * @return string
31
     */
32
    public static function getBaseTestClass(string $suite, CodeceptionTestType $type, string $prefix = 'Base') : string
33
    {
34
        return $prefix . Str::studly($suite) . Str::studly((string)$type);
35
    }
36
    
37
}
38