Test Failed
Push — master ( 7d043f...96f4c4 )
by Federico
07:15
created

Page01   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 6
Bugs 0 Features 2
Metric Value
c 6
b 0
f 2
dl 21
loc 21
rs 10
wmc 2
lcom 0
cbo 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
	class Page01 extends Template {
3
		public function __construct( $_parameters ) {
4
			parent::__construct( $_parameters );
5
			$this->tags["title"]		= "JATE - Page01";
6
			$this->tags["content"] = $this->makePage();
7
		}
8
		public function makePage() {
9
			jBlock();
10
			?>
11
			<div class="row" style="margin-top:70px;">
12
				<div class="col-lg-12">
13
					<div class="well well-sm">
14
						Page 1!
15
					</div>
16
				</div>
17
			</div>
18
			<?php
19
			$temp = jBlockClose();
20
			return $temp;
21
		}
22
	}
23
?>
24