1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
9 | class Kohana_Model_Shipping_Group extends Jam_Model { |
||
10 | |||
11 | /** |
||
12 | * @codeCoverageIgnore |
||
13 | */ |
||
14 | public static function initialize(Jam_Meta $meta) |
||
38 | |||
39 | /** |
||
40 | * Sort Model_Shipping_Item by price, biggest price first |
||
41 | * @param array $items |
||
42 | * @return array |
||
43 | */ |
||
44 | 3 | public static function sort_by_price(array $items) |
|
45 | { |
||
46 | 3 | Array_Util::validate_instance_of($items, 'Model_Shipping_Group'); |
|
47 | |||
48 | usort($items, function($item1, $item2){ |
||
49 | 3 | return $item1->price->is(Jam_Price::GREATER_THAN, $item2->price) ? -1 : 1; |
|
50 | 3 | }); |
|
51 | |||
52 | 3 | return $items; |
|
53 | } |
||
54 | |||
55 | 2 | public function total_delivery_time() |
|
59 | |||
60 | /** |
||
61 | * Get the currency for pricing calculations |
||
62 | * @return string |
||
63 | * @throws Kohana_Exception If brand_purchase_shipping is NULL |
||
64 | */ |
||
65 | 2 | public function currency() |
|
69 | |||
70 | /** |
||
71 | * Return TRUE if total is bigger than discount_threshold |
||
72 | * @return boolean |
||
73 | */ |
||
74 | 2 | public function is_discounted(Jam_Price $total) |
|
78 | } |
||
79 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.