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.

Cell::__construct()   B
last analyzed

Complexity

Conditions 6
Paths 3

Size

Total Lines 18
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 6

Importance

Changes 0
Metric Value
cc 6
eloc 9
nc 3
nop 3
dl 0
loc 18
rs 8.8571
c 0
b 0
f 0
ccs 11
cts 11
cp 1
crap 6
1
<?php
2
/**
3
 * File holding the Cell class
4
 *
5
 * This file is part of the MediaWiki skin Chameleon.
6
 *
7
 * @copyright 2013 - 2014, Stephan Gambke
8
 * @license   GNU General Public License, version 3 (or any later version)
9
 *
10
 * The Chameleon skin is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by the Free
12
 * Software Foundation, either version 3 of the License, or (at your option) any
13
 * later version.
14
 *
15
 * The Chameleon skin is distributed in the hope that it will be useful, but
16
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18
 * details.
19
 *
20
 * You should have received a copy of the GNU General Public License along
21
 * with this program. If not, see <http://www.gnu.org/licenses/>.
22
 *
23
 * @file
24
 * @ingroup Skins
25
 */
26
27
namespace Skins\Chameleon\Components;
28
29
use Skins\Chameleon\ChameleonTemplate;
30
31
/**
32
 * The Cell class.
33
 *
34
 * @ingroup Skins
35
 */
36
class Cell extends Container {
37
38 6
	public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
39
40 6
		if ( !is_null( $domElement ) ) {
41
42 5
			$span = $domElement->getAttribute( 'span' );
43
44 5
			if ( ( !is_int( $span ) && !ctype_digit( $span ) ) || ( $span < 1 ) || ( $span > 12 ) ) {
45 4
				$span = '12';
46 4
			}
47
48 5
		} else {
49 1
			$span = '12';
50
		}
51
52 6
		parent::__construct( $template, $domElement, $indent );
53
54 6
		$this->addClasses( "col-lg-$span" );
55 6
	}
56
57
}
58