JoinChunk   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
A build() 0 4 1
1
<?php
2
3
namespace BWC\Share\Data;
4
5
class JoinChunk
6
{
7
    public $type;
8
    public $table;
9
    public $on;
10
    public $alias;
11
12
    function __construct($type, $table, $on, $alias = null) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
13
        $this->type = $type;
14
        $this->table = $table;
15
        $this->on = $on;
16
        $this->alias = $alias ? $alias : '';
17
    }
18
19
    function build() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
        $result = "{$this->type} JOIN `{$this->table}` `{$this->alias}` ON {$this->on} \n";
21
        return $result;
22
    }
23
24
}