Passed
Push — master ( 3c6756...8b3b37 )
by Michael
20:43 queued 12:59
created

IntField::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
	/**
3
	 * @package Demos
4
	 */
5
	class IntField extends Field
6
	{
7
		function __construct($name, $default, $hint = 'Integer')
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
8
		{
9
			parent::__construct($name, $default, $hint);
10
		}
11
		
12
		function init($request)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
13
		{
14
			$this->value = $request->getInt($this->name, $this->default);
15
		}
16
	}
17