Kohana_Jam_Behavior_Shippable_Purchase_Item   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 19
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 13 1
1
<?php defined('SYSPATH') OR die('No direct script access.');
2
3
/**
4
 * @package    openbuildings\shipping
5
 * @author     Ivan Kerin <[email protected]>
6
 * @copyright  (c) 2013 OpenBuildings Ltd.
7
 * @license    http://spdx.org/licenses/BSD-3-Clause
8
 */
9
class Kohana_Jam_Behavior_Shippable_Purchase_Item extends Jam_Behavior {
10
11
	/**
12
	 * @codeCoverageIgnore
13
	 */
14
	public function initialize(Jam_Meta $meta, $name)
15
	{
16
		parent::initialize($meta, $name);
17
18
		$meta
19
			->associations(array(
20
				'shipping_item' => Jam::association('hasone', array(
21
					'inverse_of' => 'purchase_item',
22
					'foreign_key' => 'purchase_item_id',
23
					'dependent' => Jam_Association::DELETE
24
				)),
25
			));
26
	}
27
}
28