ClearStack::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
nc 1
nop 3
1
<?php
2
3
namespace PHPDaemon\Exceptions;
4
5
class ClearStack extends \Exception
6
{
7
    /**
8
     * Thread object
9
     * @var object Thread
10
     */
11
    protected $thread;
12
13
    /**
14
     * @param string  $msg Message
15
     * @param integer $code Code
16
     * @param \PHPDaemon\Thread\Generic $thread
0 ignored issues
show
Documentation introduced by
Should the type for parameter $thread not be \PHPDaemon\Thread\Generic|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
17
     */
18
    public function __construct($msg, $code, $thread = null)
19
    {
20
        parent::__construct($msg, $code);
21
        $this->thread = $thread;
22
    }
23
24
    /**
25
     * Gets associated Thread object
26
     * @return object Thread
27
     */
28
    public function getThread()
29
    {
30
        return $this->thread;
31
    }
32
}
33