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.

ImapAdapter   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getInstance() 0 8 2
A setInstance() 0 6 1
A __call() 0 4 1
1
<?php
2
3
namespace Checkdomain\Comodo;
4
5
/**
6
 * @method void                        appendMessage(string $message, $folder = null, array $flags = null)
7
 * @method void                        close()
8
 * @method void                        copyMessage(int $id, $folder)
9
 * @method int                         count()
10
 * @method int                         countMessages($flags = null)
11
 * @method void                        createFolder(string $name, $parentFolder = null)
12
 * @method \Zend\Mail\Storage\Message  current()
13
 * @method array                       getCapabilities()
14
 * @method \Zend\Mail\Storage\Folder   getCurrentFolder()
15
 * @method \Zend\Mail\Storage\Folder   getFolders($rootFolder = null)
16
 * @method \Zend\Mail\Storage\Message  getMessage(int $id)
17
 * @method int                         getNumberByUniqueId(string $id)
18
 * @method array|string                getRawContent(int $id, $part = null)
19
 * @method array|string                getRawHeader(int $id, $part = null, int $topLines = 0)
20
 * @method array|int                   getSize(int $id)
21
 * @method array|string                getUniqueId(int $id = null)
22
 * @method int                         key()
23
 * @method void                        moveMessage(int $id, $folder)
24
 * @method void                        next()
25
 * @method void                        noop()
26
 * @method bool                        offsetExists(int $int)
27
 * @method int                         offsetGet(int $id)
28
 * @method void                        offsetSet(int $id)
29
 * @method bool                        offsetUnset(int $id)
30
 * @method void                        removeFolder($name)
31
 * @method void                        removeMessage(int $id)
32
 * @method void                        renameFolder($oldName, string $newName)
33
 * @method void                        rewind()
34
 * @method void                        seek(int $pos)
35
 * @method void                        selectFolder($globalName)
36
 * @method void                        setFlags(int $id, array $flags)
37
 * @method bool                        valid()
38
 * @method array                       search(array $params)
39
 *
40
 * @package Checkdomain\Comodo
41
 */
42
class ImapAdapter
43
{
44
    /**
45
     * @var array
46
     */
47
    protected $params;
48
49
    /**
50
     * @var null|ImapExtension
51
     */
52
    protected $instance;
53
54
    /**
55
     * @param array $params
56
     */
57
    public function __construct(array $params = [])
58
    {
59
        $this->params = $params;
60
    }
61
62
    /**
63
     * @return ImapExtension
64
     */
65
    public function getInstance()
66
    {
67
        if ($this->instance) {
68
            return $this->instance;
69
        }
70
71
        return new ImapExtension($this->params);
72
    }
73
74
    /**
75
     * @param ImapExtension $instance
76
     *
77
     * @return $this
78
     */
79
    public function setInstance(ImapExtension $instance)
80
    {
81
        $this->instance = $instance;
82
83
        return $this;
84
    }
85
86
    /**
87
     * @param string $name
88
     * @param array $arguments
89
     *
90
     * @return mixed
91
     */
92
    public function __call($name, $arguments)
93
    {
94
        return call_user_func_array([$this->getInstance(), $name], $arguments);
95
    }
96
}
97