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.

Christofides   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setGraph() 0 4 1
A computeRoute() 0 4 1
1
<?php
2
3
namespace Letournel\PathFinder\Algorithms\TravelingSalesman;
4
5
use Letournel\PathFinder\AlgorithmTravelingSalesman;
6
use Letournel\PathFinder\Core\NodeGraph;
7
8
class Christofides implements AlgorithmTravelingSalesman
9
{
10
    /*
11
     * For more info see
12
     * http://en.wikipedia.org/wiki/Christofides_algorithm
13
     */
14
    
15
    private
16
        $graph;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $graph.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
17
    
18
    public function setGraph(NodeGraph $graph)
19
    {
20
        $this->graph = $graph;
21
    }
22
    
23
    public function computeRoute()
24
    {
25
        throw new \RuntimeException('Not implemented');
26
    }
27
}
28