GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Rows   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A column() 0 6 1
A leftJoin() 0 7 2
1
<?php
2
3
namespace PhpBoot\DB;
4
5
if(!function_exists("array_column"))
6
{
7
8
    function array_column($array, $column_name)
9
    {
10
11
        return array_map(function($element) use($column_name){return $element[$column_name];}, $array);
12
13
    }
14
15
}
16
class Rows
17
{
18
    static function column($array,$column_name)
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...
19
    {
20
21
        return array_map(function($element) use($column_name){return $element[$column_name];}, $array);
22
23
    }
24
    static public function leftJoin(&$lh, $rh, $lKey, $rkey, $destKey){
25
        $map = array_combine(self::column($rh,$rkey),$rh);
26
27
        foreach ($lh as &$v){
28
            $v[$destKey]=$map[$v[$lKey]];
29
        }
30
    }
31
}