Passed
Branch master (8cb5b2)
by Christopher
04:33 queued 12s
created

Builder::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style introduced by
The PHP open tag does not have a corresponding PHP close tag
Loading history...
2
namespace Triadev\Leopard\Business\Mapping;
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
class Builder
0 ignored issues
show
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
5
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class Builder
Loading history...
6
    /**
7
     * Create
8
     *
9
     * @param \Closure $blueprint
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
10
     * @param string $index
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
11
     * @param string $type
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 3 spaces after parameter type; 1 found
Loading history...
12
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
13 8
    public function create(\Closure $blueprint, string $index, string $type)
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
14
    {
15 8
        $blueprintMapping = new Blueprint();
16 8
        $blueprint($blueprintMapping);
17
        
18 8
        $blueprintMapping->build($index, $type);
19 8
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end create()
Loading history...
20
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
21