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.
Completed
Push — master ( 646ea8...4450cc )
by Robbie
13s
created

TestExceptingJob::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Symbiote\QueuedJobs\Tests\QueuedJobsTest;
4
5
use Symbiote\QueuedJobs\Services\AbstractQueuedJob;
6
use Symbiote\QueuedJobs\Services\QueuedJob;
7
use Exception;
8
9
class TestExceptingJob extends AbstractQueuedJob implements QueuedJob
10
{
11
    private $type = QueuedJob::QUEUED;
12
13
    public function __construct($type = null)
14
    {
15
        $this->type = QueuedJob::IMMEDIATE;
16
        $this->times = array();
0 ignored issues
show
Documentation introduced by
The property times does not exist on object<Symbiote\QueuedJo...sTest\TestExceptingJob>. Since you implemented __set, maybe consider adding a @property annotation.

Since your code implements the magic setter _set, this function will be called for any write access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

Since the property has write access only, you can use the @property-write annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
17
    }
18
19
    public function getJobType()
20
    {
21
        return $this->type;
22
    }
23
24
    public function getTitle()
25
    {
26
        return "A Test job throwing exceptions";
27
    }
28
29
    public function setup()
30
    {
31
        $this->totalSteps = 1;
32
    }
33
34
    public function process()
35
    {
36
        throw new Exception("just excepted");
37
    }
38
}
39