Completed
Push — master ( 7b7583...45d1d8 )
by Scott
02:56
created

DesmondSpecialFunction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
run() 0 1 ?
A __toString() 0 4 1
A value() 0 4 1
1
<?php
2
namespace Desmond\functions;
3
use Desmond\data_types\StringType;
4
5
abstract class DesmondSpecialFunction
6
{
7
    public $function;
8
    public $currentEnv;
9
    public $eval;
10
    abstract public function run(array $args);
11
12
    public function __toString()
13
    {
14
        return '#<function> ' . $this->id();
0 ignored issues
show
Bug introduced by
The method id() does not seem to exist on object<Desmond\functions\DesmondSpecialFunction>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
15
    }
16
17
    public function value()
18
    {
19
        return new StringType('#<function> ' . $this->id());
0 ignored issues
show
Bug introduced by
The method id() does not seem to exist on object<Desmond\functions\DesmondSpecialFunction>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
    }
21
}
22