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.

Behavior   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 33
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOption() 0 4 2
A setOwner() 0 5 1
A getOwner() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the PHPMongo package.
5
 *
6
 * (c) Dmytro Sokil <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sokil\Mongo;
13
14
/**
15
 * Abstract class of behavior. Every behavior class must extend it.
16
 *
17
 * @link https://github.com/sokil/php-mongo#behaviors
18
 */
19
abstract class Behavior
20
{
21
    private $owner;
22
    
23
    private $options;
24
    
25
    public function __construct(array $options = array())
26
    {
27
        $this->options = $options;
28
    }
29
30
    protected function getOption($name)
31
    {
32
        return isset($this->options[$name]) ? $this->options[$name] : null;
33
    }
34
    
35
    /**
36
     * @param Document $owner
37
     */
38
    public function setOwner($owner)
39
    {
40
        $this->owner = $owner;
41
        return $this;
42
    }
43
    
44
    /**
45
     * @return Document
46
     */
47
    protected function getOwner()
48
    {
49
        return $this->owner;
50
    }
51
}
52