Passed
Push — master ( a357e7...195a07 )
by Anton
04:22 queued 01:11
created

Action   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContents() 0 16 2
1
<?php
2
3
namespace Modules\Auth\Utils {
4
5
	use Frames, Utils\View;
6
7
	abstract class Action {
8
9
		protected $view = '', $code = '', $form = null;
10
11
		# Get contents
12
13
		protected function getContents() {
14
15
			$contents = View::get($this->view);
16
17
			# Set code
18
19
			$contents->code = $this->code;
20
21
			# Implement form
22
23
			if (null !== $this->form) $this->form->implement($contents);
24
25
			# ------------------------
26
27
			return $contents;
28
		}
29
	}
30
}
31