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.

TbThumbnails::renderItems()   B
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 25
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 0
Metric Value
dl 0
loc 25
ccs 0
cts 20
cp 0
rs 8.5806
c 0
b 0
f 0
cc 4
eloc 17
nc 3
nop 0
crap 20
1
<?php
2
/**
3
 *## TbThumbnails class file.
4
 *
5
 * @author Christoffer Niska <[email protected]>
6
 * @copyright Copyright &copy; Christoffer Niska 2011-
7
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
8
 */
9
10
Yii::import('booster.widgets.TbListView');
11
12
/**
13
 *## Bootstrap thumbnails widget.
14
 *
15
 * @see http://twitter.github.com/bootstrap/components.html#thumbnails
16
 *
17
 * @package booster.widgets.grouping
18
 */
19
class TbThumbnails extends TbListView {
20
	
21
	/**
22
	 * Renders the data items for the view.
23
	 * Each item is corresponding to a single data model instance.
24
	 * Child classes should override this method to provide the actual item rendering logic.
25
	 */
26
	public function renderItems() {
27
		
28
		echo CHtml::openTag($this->itemsTagName, array('class' => $this->itemsCssClass)) . "\n";
29
30
		$data = $this->dataProvider->getData();
31
32
		if (!empty($data)) {
33
			echo CHtml::openTag('div', array('class' => 'row'));
34
			$owner = $this->getOwner();
35
			$render = $owner instanceof CController ? 'renderPartial' : 'render';
0 ignored issues
show
Bug introduced by
The class CController does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
36
			foreach ($data as $i => $item) {
37
				$data = $this->viewData;
38
				$data['index'] = $i;
39
				$data['data'] = $item;
40
				$data['widget'] = $this;
41
				$owner->$render($this->itemView, $data);
42
			}
43
44
			echo '</div>';
45
		} else {
46
			$this->renderEmptyText();
47
		}
48
49
		echo CHtml::closeTag($this->itemsTagName);
50
	}
51
}
52