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.

ImageStrategyTest::SetUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
namespace HtImgModuleTest\View\Strategy;
3
4
use HtImgModule\View\Strategy\ImageStrategy;
5
use HtImgModule\View\Model\ImageModel;
6
use Zend\View\Model\ViewModel;
7
use Imagine\Gd\Imagine;
8
use Zend\View\ViewEvent;
9
10
class ImageStrategyTest extends \PHPUnit_Framework_TestCase
11
{
12
    public function SetUp()
13
    {
14
        $this->model = new ImageModel;
0 ignored issues
show
Bug introduced by
The property model does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
15
        $this->strategy = new ImageStrategy(new Imagine);
0 ignored issues
show
Bug introduced by
The property strategy does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
16
        $this->viewEvent = new ViewEvent();
0 ignored issues
show
Bug introduced by
The property viewEvent does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
17
        $this->viewEvent->setModel($this->model);
18
    }
19
20
    public function testException()
21
    {
22
        $this->setExpectedException('HtImgModule\Exception\RuntimeException');
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::setExpectedException() has been deprecated with message: Method deprecated since Release 5.2.0; use expectException() instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
23
        $this->strategy->selectRenderer($this->viewEvent);
24
    }
25
26
    public function testAnotherModel()
27
    {
28
        $viewEvent = new ViewEvent();
29
        $viewEvent->setModel(new ViewModel);
30
        $this->strategy->selectRenderer($viewEvent);
31
    }
32
33
}
34