Completed
Push — master ( ec2c00...c3f83b )
by Markus
05:40
created

Default_UnavailableSuccessView   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 13
loc 13
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
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
3
// +---------------------------------------------------------------------------+
4
// | This file is part of the Agavi package.                                   |
5
// | Copyright (c) 2005-2011 the Agavi Project.                                |
6
// |                                                                           |
7
// | For the full copyright and license information, please view the LICENSE   |
8
// | file that was distributed with this source code. You can also view the    |
9
// | LICENSE file online at http://www.agavi.org/LICENSE.txt                   |
10
// |   vi: set noexpandtab:                                                    |
11
// |   Local Variables:                                                        |
12
// |   indent-tabs-mode: t                                                     |
13
// |   End:                                                                    |
14
// +---------------------------------------------------------------------------+
15
use Agavi\Request\RequestDataHolder;
16
17
class Default_UnavailableSuccessView extends SampleAppDefaultBaseView
18
{
19
	public function executeHtml(RequestDataHolder $rd)
20
	{
21
		$this->setupHtml($rd);
22
23
		// set the title
24
		$this->setAttribute('_title', $this->tm->_('This Application is Unavailable', 'default.ErrorActions'));
25
		
26
		$this->getResponse()->setHttpStatusCode('503');
27
	}
28
29
}
30
31
?>