@@ -192,7 +192,7 @@ |
||
192 | 192 | * @param mixed sub_access_id either id or name of sub_access |
193 | 193 | * @param integer intranet_id id of intranet to give access |
194 | 194 | * |
195 | - * @return void |
|
195 | + * @return boolean |
|
196 | 196 | */ |
197 | 197 | function setSubAccess($module_id, $sub_access_id, $intranet_id = 0) |
198 | 198 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * returns Payment object |
41 | 41 | * |
42 | - * @return object Payment |
|
42 | + * @return Payment Payment |
|
43 | 43 | */ |
44 | 44 | private function getPayment() |
45 | 45 | { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * returns depreciation object |
52 | 52 | * |
53 | - * @return object Depreciation |
|
53 | + * @return Depreciation Depreciation |
|
54 | 54 | */ |
55 | 55 | private function getDepreciation() |
56 | 56 | { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | /** |
62 | 62 | * Returns Credit note object |
63 | 63 | * |
64 | - * @return object creditnote |
|
64 | + * @return CreditNote creditnote |
|
65 | 65 | */ |
66 | 66 | private function getCreditNote() |
67 | 67 | { |
@@ -11,6 +11,9 @@ |
||
11 | 11 | private $db; |
12 | 12 | public $error; |
13 | 13 | |
14 | + /** |
|
15 | + * @param Reminder $reminder |
|
16 | + */ |
|
14 | 17 | function __construct($reminder, $id = 0) |
15 | 18 | { |
16 | 19 | $this->reminder = $reminder; |
@@ -249,6 +249,7 @@ discard block |
||
249 | 249 | * Returns on the basis of the module package which type of add this is. Can be either add, extend, or upgrade |
250 | 250 | * |
251 | 251 | * @param object modulepackage An modulepackage object |
252 | + * @param Intraface_modules_modulepackage_ModulePackage $modulepackage |
|
252 | 253 | * |
253 | 254 | * @return string either 'add', 'extend' or 'upgrade' |
254 | 255 | */ |
@@ -288,6 +289,7 @@ discard block |
||
288 | 289 | * Returns the end date of the last modulepacke in a given group |
289 | 290 | * |
290 | 291 | * @param object modulepackage |
292 | + * @return string |
|
291 | 293 | */ |
292 | 294 | public function getLastEndDateInGroup($modulepackage) |
293 | 295 | { |
@@ -387,6 +389,8 @@ discard block |
||
387 | 389 | * |
388 | 390 | * @param object modulepackage module package |
389 | 391 | * @param string duration Duration as either date 'dd-mm-yyyy' or 'yyyy-mm-dd' or 'X month' where X is any whole number |
392 | + * @param Intraface_modules_modulepackage_ModulePackage $modulepackage |
|
393 | + * @param string $duration |
|
390 | 394 | * |
391 | 395 | * @return object Action object with the actions needed to be processed |
392 | 396 | */ |
@@ -453,6 +457,8 @@ discard block |
||
453 | 457 | * |
454 | 458 | * @param object modulepackage |
455 | 459 | * @param string duration Duration as either date 'dd-mm-yyyy' or 'yyyy-mm-dd' or 'X month' where X is any whole number |
460 | + * @param Intraface_modules_modulepackage_ModulePackage $modulepackage |
|
461 | + * @param string $duration |
|
456 | 462 | * |
457 | 463 | * @return object Action object with the actions needed to be performed |
458 | 464 | */ |
@@ -603,7 +609,7 @@ discard block |
||
603 | 609 | /** |
604 | 610 | * Returns the possible types of status' |
605 | 611 | * |
606 | - * @return array status types |
|
612 | + * @return string[] status types |
|
607 | 613 | */ |
608 | 614 | public static function getStatusTypes() |
609 | 615 | { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | // Should we rather just take intranet_id as parameter? |
49 | 49 | $this->intranet = &$intranet; |
50 | 50 | $this->db = MDB2::singleton(DB_DSN); |
51 | - $this->error = new Intraface_Error; |
|
51 | + $this->error = new Intraface_Error; |
|
52 | 52 | $this->id = (int)$id; |
53 | 53 | |
54 | 54 | if ($this->id > 0) { |
@@ -69,20 +69,20 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | // TODO: This could actually easily use dbquery |
72 | - $result = $this->db->query('SELECT intranet_module_package.id, ' . |
|
73 | - 'intranet_module_package.module_package_id, ' . |
|
74 | - 'intranet_module_package.start_date, ' . |
|
75 | - 'intranet_module_package.end_date, ' . |
|
76 | - 'intranet_module_package.order_debtor_id, ' . |
|
77 | - 'intranet_module_package.status_key, ' . |
|
78 | - 'module_package_plan.plan, ' . |
|
79 | - 'module_package_group.group_name, ' . |
|
80 | - 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' . |
|
81 | - 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date ' . |
|
82 | - 'FROM intranet_module_package ' . |
|
83 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
84 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
85 | - 'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id ' . |
|
72 | + $result = $this->db->query('SELECT intranet_module_package.id, '. |
|
73 | + 'intranet_module_package.module_package_id, '. |
|
74 | + 'intranet_module_package.start_date, '. |
|
75 | + 'intranet_module_package.end_date, '. |
|
76 | + 'intranet_module_package.order_debtor_id, '. |
|
77 | + 'intranet_module_package.status_key, '. |
|
78 | + 'module_package_plan.plan, '. |
|
79 | + 'module_package_group.group_name, '. |
|
80 | + 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '. |
|
81 | + 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date '. |
|
82 | + 'FROM intranet_module_package '. |
|
83 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
84 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
85 | + 'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id '. |
|
86 | 86 | 'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND intranet_module_package.id = '.$this->db->quote($this->id, 'integer')); |
87 | 87 | |
88 | 88 | if (PEAR::isError($result)) { |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | return false; |
162 | 162 | } |
163 | 163 | |
164 | - $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", " . |
|
165 | - "start_date = ".$this->db->quote($start_date, 'date').", " . |
|
164 | + $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", ". |
|
165 | + "start_date = ".$this->db->quote($start_date, 'date').", ". |
|
166 | 166 | "end_date = ".$this->db->quote($end_date, 'date'); |
167 | 167 | |
168 | 168 | $result = $this->db->exec("INSERT INTO intranet_module_package SET ".$sql.", status_key = 1, active = 1, intranet_id = ".$this->intranet->get('id')); |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | return false; |
198 | 198 | } |
199 | 199 | |
200 | - $result = $this->db->exec('UPDATE intranet_module_package ' . |
|
201 | - 'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' ' . |
|
200 | + $result = $this->db->exec('UPDATE intranet_module_package '. |
|
201 | + 'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' '. |
|
202 | 202 | 'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer')); |
203 | 203 | |
204 | 204 | if (PEAR::isError($result)) { |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | |
222 | 222 | $result = $this->db->exec("UPDATE intranet_module_package SET status_key = 3 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
223 | 223 | if (PEAR::isError($result)) { |
224 | - throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :". $result->getUserInfo()); |
|
224 | + throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :".$result->getUserInfo()); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | return $result; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | $result = $this->db->exec("UPDATE intranet_module_package SET active = 0 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
241 | 241 | if (PEAR::isError($result)) { |
242 | - throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :". $result->getUserInfo()); |
|
242 | + throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :".$result->getUserInfo()); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | return $result; |
@@ -263,10 +263,10 @@ discard block |
||
263 | 263 | } |
264 | 264 | |
265 | 265 | // TODO: If DBQuery had not needed kernel we could have used it here! |
266 | - $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package ' . |
|
267 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
268 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
269 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
266 | + $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package '. |
|
267 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
268 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
269 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
270 | 270 | 'ORDER BY end_date DESC'); |
271 | 271 | |
272 | 272 | if (PEAR::isError($result)) { |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | } |
302 | 302 | |
303 | 303 | // TODO: If DBQuery had not needed kernel we could have used it here! |
304 | - $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package ' . |
|
305 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
306 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
307 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
304 | + $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package '. |
|
305 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
306 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
307 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
308 | 308 | 'ORDER BY end_date DESC'); |
309 | 309 | |
310 | 310 | if (PEAR::isError($result)) { |
@@ -480,11 +480,11 @@ discard block |
||
480 | 480 | $shop = new Intraface_modules_modulepackage_ShopExtension; |
481 | 481 | |
482 | 482 | // TODO: If DBQuery had not needed kernel we could have used it here! |
483 | - $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id ' . |
|
484 | - 'FROM intranet_module_package ' . |
|
485 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
486 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
487 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
483 | + $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id '. |
|
484 | + 'FROM intranet_module_package '. |
|
485 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
486 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
487 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
488 | 488 | 'ORDER BY end_date DESC'); |
489 | 489 | |
490 | 490 | if (PEAR::isError($result)) { |
@@ -567,15 +567,15 @@ discard block |
||
567 | 567 | $this->dbquery->setSorting('module_package_group.sorting_index, module_package_plan.plan_index, intranet_module_package.start_date'); |
568 | 568 | } |
569 | 569 | |
570 | - $db = $this->dbquery->getRecordset('intranet_module_package.id, ' . |
|
571 | - 'intranet_module_package.module_package_id, ' . |
|
572 | - 'intranet_module_package.start_date, ' . |
|
573 | - 'intranet_module_package.end_date, ' . |
|
574 | - 'intranet_module_package.order_debtor_id, ' . |
|
575 | - 'intranet_module_package.status_key, ' . |
|
576 | - 'module_package_plan.plan, ' . |
|
577 | - 'module_package_group.group_name, ' . |
|
578 | - 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' . |
|
570 | + $db = $this->dbquery->getRecordset('intranet_module_package.id, '. |
|
571 | + 'intranet_module_package.module_package_id, '. |
|
572 | + 'intranet_module_package.start_date, '. |
|
573 | + 'intranet_module_package.end_date, '. |
|
574 | + 'intranet_module_package.order_debtor_id, '. |
|
575 | + 'intranet_module_package.status_key, '. |
|
576 | + 'module_package_plan.plan, '. |
|
577 | + 'module_package_group.group_name, '. |
|
578 | + 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '. |
|
579 | 579 | 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date', '', false); |
580 | 580 | |
581 | 581 | $modulepackages = array(); |
@@ -8,6 +8,9 @@ |
||
8 | 8 | |
9 | 9 | class OnlinePaymentDefault extends OnlinePayment |
10 | 10 | { |
11 | + /** |
|
12 | + * @param integer $id |
|
13 | + */ |
|
11 | 14 | function __construct($kernel, $id) |
12 | 15 | { |
13 | 16 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @todo $doctrine should not be optional |
22 | 22 | * |
23 | 23 | * @param object $doctrine Doctrine_Connection |
24 | - * @return void |
|
24 | + * @return integer |
|
25 | 25 | */ |
26 | 26 | public function __construct($doctrine = null) |
27 | 27 | { |
@@ -64,6 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * Find a variation from id |
66 | 66 | * |
67 | + * @param integer $id |
|
67 | 68 | * @return object Intraface_modules_product_Variation_OneAttributeGroup or Intraface_modules_product_Variation_TwoAttributeGroups |
68 | 69 | */ |
69 | 70 | public function findById($id) |
@@ -44,7 +44,7 @@ |
||
44 | 44 | } elseif (count($this->groups) == 1) { |
45 | 45 | $this->variation = new Intraface_modules_product_Variation_OneAttributeGroup; |
46 | 46 | } elseif (count($this->groups) == 2) { |
47 | - $this->variation = new Intraface_modules_product_Variation_TwoAttributeGroups; |
|
47 | + $this->variation = new Intraface_modules_product_Variation_TwoAttributeGroups; |
|
48 | 48 | } else { |
49 | 49 | throw new Exception('At the moment the system only supports up to two attribute groups!'); |
50 | 50 | } |
@@ -42,6 +42,7 @@ |
||
42 | 42 | /** |
43 | 43 | * Finds record from id |
44 | 44 | * |
45 | + * @param integer $id |
|
45 | 46 | * @return Intraface_modules_shop_DiscountCampaign |
46 | 47 | */ |
47 | 48 | public function findById($id) |
@@ -27,6 +27,9 @@ |
||
27 | 27 | $this->actAs('Intraface_Doctrine_Template_Intranet'); |
28 | 28 | } |
29 | 29 | |
30 | + /** |
|
31 | + * @return string |
|
32 | + */ |
|
30 | 33 | function getId() |
31 | 34 | { |
32 | 35 | return $this->id; |