Completed
Push — master ( ee37c6...72a69a )
by Mikael
02:27
created

DatabaseConfigure   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setDefaultsFromConfiguration() 0 4 1
1
<?php
2
3
namespace Anax\Database;
4
5
/**
6
 * Namespaced exception.
7
 */
8
class DatabaseConfigure extends Database implements \Anax\Common\ConfigureInterface
9
{
10
    use \Anax\Common\ConfigureTrait;
11
12
13
14
    /**
15
     * Set options by using configuration.
16
     *
17
     * @return void
18
     */
19
    public function setDefaultsFromConfiguration()
20
    {
21
        parent::setOptions($this->config);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (setOptions() instead of setDefaultsFromConfiguration()). Are you sure this is correct? If so, you might want to change this to $this->setOptions().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
22
    }
23
}
24