AdapterTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 1
c 4
b 2
f 0
lcom 0
cbo 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAdapter() 0 4 1
1
<?php namespace AdammBalogh\KeyValueStore\Implementation;
2
3
trait AdapterTrait
4
{
5
    /**
6
     * @return \AdammBalogh\KeyValueStore\Contract\AdapterInterface
7
     */
8
    public function getAdapter()
9
    {
10
        return $this->adapter;
0 ignored issues
show
Bug introduced by
The property adapter does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
11
    }
12
}
13