Completed
Push — master ( f08276...333f55 )
by Richard
06:54 queued 34s
created

LanguageConstruct   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A construct_name() 0 3 1
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 *
5
 * Copyright (c) 2016 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received
8
 * a copy of the licence along with the code.
9
 */
10
11
namespace Lechimp\Dicto\Variables;
12
13
class LanguageConstruct extends Variable {
14
    /**
15
     * @var string
16
     */
17
    private $construct_name;
18
19 99
    public function __construct($name, $construct_name) {
20 99
        parent::__construct($name);
21 99
        assert('is_string($construct_name)');
22
        // TODO: Restrict the possible construct_names (like @, unset, echo, ...)
0 ignored issues
show
Unused Code Comprehensibility introduced by
36% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
23 99
        $this->construct_name = $construct_name;     
24 99
    }
25
26
    /**
27
     * @return  string
28
     */
29 7
    public function construct_name() {
30 7
        return $this->construct_name;
31
    }
32
}
33
34