Kohana_Model_Terms_Item   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 17
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 14 1
1
<?php defined('SYSPATH') OR die('No direct script access.');
2
3
/**
4
 * @author     Ivan Kerin <[email protected]>
5
 * @copyright  (c) 2014 Clippings Ltd.
6
 * @license    http://spdx.org/licenses/BSD-3-Clause
7
 */
8
class Kohana_Model_Terms_Item extends Jam_Model {
9
10
	public static function initialize(Jam_Meta $meta)
11
	{
12
		$meta
13
			->name_key('id');
14
15
		$meta->associations(array(
16
			'term' => Jam::association('belongsto'),
17
			'item' => Jam::association('belongsto', array('polymorphic' => TRUE)),
18
		));
19
20
		$meta->fields(array(
21
			'id' => Jam::field('primary'),
22
		));
23
	}
24
}
25