Passed
Push — 0.3.0 ( 0d73f1...9a02d7 )
by Anton
04:10
created

User::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Modules\Entitizer\Dataset {
4
5
	use Modules\Entitizer;
6
7
	class User extends Entitizer\Utils\Dataset {
8
9
		use Entitizer\Common\User;
10
11
		# Init dataset
12
13
		protected function init() {
14
15
			$this->addHandler('full_name', function (array $data) {
16
17
				return trim($data['first_name'] . ' ' . $data['last_name']);
18
			});
19
		}
20
	}
21
}
22