Completed
Push — master ( ce2dd0...10a6ac )
by Nicolaas
04:02
created
code/model/Order.php 1 patch
Doc Comments   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      * @param bool (optional) $b
197 197
      * @param int (optional)  $orderID
198 198
      *
199
-     * @return bool
199
+     * @return boolean|null
200 200
      */
201 201
     public static function set_needs_recalculating($b = true, $orderID = 0)
202 202
     {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     /**
269 269
      * This function returns the OrderSteps.
270 270
      *
271
-     * @return ArrayList (OrderSteps)
271
+     * @return DataList (OrderSteps)
272 272
      **/
273 273
     public static function get_order_status_options()
274 274
     {
@@ -467,6 +467,7 @@  discard block
 block discarded – undo
467 467
      * link to edit the record.
468 468
      *
469 469
      * @param string | Null $action - e.g. edit
470
+     * @param string $action
470 471
      *
471 472
      * @return string
472 473
      */
@@ -1410,7 +1411,7 @@  discard block
 block discarded – undo
1410 1411
      * Has the order been paid?
1411 1412
      * TODO: why do we check if there is a total at all?
1412 1413
      *
1413
-     * @return Boolean (object)
1414
+     * @return DBField (object)
1414 1415
      */
1415 1416
     public function IsPaidNice()
1416 1417
     {
@@ -1665,7 +1666,7 @@  discard block
 block discarded – undo
1665 1666
      * Stores the preferred currency of the order.
1666 1667
      * IMPORTANTLY we store the exchange rate for future reference...
1667 1668
      *
1668
-     * @param EcommerceCurrency $currency
1669
+     * @param EcommerceCurrency $newCurrency
1669 1670
      */
1670 1671
     public function UpdateCurrency($newCurrency)
1671 1672
     {
@@ -2126,7 +2127,7 @@  discard block
 block discarded – undo
2126 2127
      * @param string|array $excluded               - Class(es) of modifier(s) to ignore in the calculation.
2127 2128
      * @param bool         $stopAtExcludedModifier - when this flag is TRUE, we stop adding the modifiers when we reach an excluded modifier.
2128 2129
      *
2129
-     * @return float
2130
+     * @return integer
2130 2131
      */
2131 2132
     public function ModifiersSubTotal($excluded = null, $stopAtExcludedModifier = false)
2132 2133
     {
@@ -2324,7 +2325,7 @@  discard block
 block discarded – undo
2324 2325
      *
2325 2326
      * @param Member (optional) $member
2326 2327
      *
2327
-     * @return bool
2328
+     * @return boolean|null
2328 2329
      **/
2329 2330
     public function canViewAdminStuff($member = null)
2330 2331
     {
@@ -2377,7 +2378,7 @@  discard block
 block discarded – undo
2377 2378
      * If any of them need immediate attention then this is done
2378 2379
      * first after which it will go through to the checkout page.
2379 2380
      *
2380
-     * @param Member (optional) $member
2381
+     * @param Member Member $member
2381 2382
      *
2382 2383
      * @return bool
2383 2384
      **/
@@ -2744,6 +2745,10 @@  discard block
 block discarded – undo
2744 2745
     {
2745 2746
         return $this->getTitle($dateFormat, $includeName);
2746 2747
     }
2748
+
2749
+    /**
2750
+     * @param string $dateFormat
2751
+     */
2747 2752
     public function getTitle($dateFormat = null, $includeName = false)
2748 2753
     {
2749 2754
         if ($this->exists()) {
@@ -2807,7 +2812,7 @@  discard block
 block discarded – undo
2807 2812
     /**
2808 2813
      * Returns the subtotal of the items for this order.
2809 2814
      *
2810
-     * @return float
2815
+     * @return integer
2811 2816
      */
2812 2817
     public function SubTotal()
2813 2818
     {
@@ -2873,7 +2878,7 @@  discard block
 block discarded – undo
2873 2878
     /**
2874 2879
      * Returns the total cost of an order including the additional charges or deductions of its modifiers.
2875 2880
      *
2876
-     * @return float
2881
+     * @return integer
2877 2882
      */
2878 2883
     public function Total()
2879 2884
     {
@@ -3338,7 +3343,7 @@  discard block
 block discarded – undo
3338 3343
     /**
3339 3344
      * Submission Log for this Order (if any).
3340 3345
      *
3341
-     * @return DateTime
3346
+     * @return DBField
3342 3347
      **/
3343 3348
     public function OrderDate()
3344 3349
     {
@@ -3520,7 +3525,7 @@  discard block
 block discarded – undo
3520 3525
     /**
3521 3526
      * Converts the Order into HTML, based on the Order Template.
3522 3527
      *
3523
-     * @return HTML Object
3528
+     * @return DBField Object
3524 3529
      **/
3525 3530
     public function ConvertToHTML()
3526 3531
     {
@@ -3584,7 +3589,7 @@  discard block
 block discarded – undo
3584 3589
      * In templates, it is used like this:
3585 3590
      * $EcommerceConfigAjax.TableID.
3586 3591
      *
3587
-     * @return EcommerceConfigAjax
3592
+     * @return EcommerceConfigAjaxDefinitions
3588 3593
      **/
3589 3594
     public function AJAXDefinitions()
3590 3595
     {
Please login to merge, or discard this patch.
code/api/ShoppingCart.php 1 patch
Doc Comments   +18 added lines, -17 removed lines patch added patch discarded remove patch
@@ -350,8 +350,8 @@  discard block
 block discarded – undo
350 350
      * Adds any number of items to the cart.
351 351
      * Returns the order item on succes OR false on failure.
352 352
      *
353
-     * @param DataObject $buyable    - the buyable (generally a product) being added to the cart
354
-     * @param float      $quantity   - number of items add.
353
+     * @param BuyableModel $buyable    - the buyable (generally a product) being added to the cart
354
+     * @param integer      $quantity   - number of items add.
355 355
      * @param mixed      $parameters - array of parameters to target a specific order item. eg: group=1, length=5
356 356
      *                                 if you make it a form, it will save the form into the orderitem
357 357
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      *
399 399
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
400 400
      *
401
-     * @param DataObject $buyable    - the buyable (generally a product) being added to the cart
401
+     * @param BuyableModel $buyable    - the buyable (generally a product) being added to the cart
402 402
      * @param float      $quantity   - number of items add.
403 403
      * @param array      $parameters - array of parameters to target a specific order item. eg: group=1, length=5
404 404
      *
@@ -428,8 +428,8 @@  discard block
 block discarded – undo
428 428
      *
429 429
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
430 430
      *
431
-     * @param DataObject $buyable    - the buyable (generally a product) being added to the cart
432
-     * @param float      $quantity   - number of items add.
431
+     * @param BuyableModel $buyable    - the buyable (generally a product) being added to the cart
432
+     * @param integer      $quantity   - number of items add.
433 433
      * @param array      $parameters - array of parameters to target a specific order item. eg: group=1, length=5
434 434
      *
435 435
      * @return false | OrderItem | null
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
      *
468 468
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
469 469
      *
470
-     * @param OrderItem $buyable    - the buyable (generally a product) being added to the cart
470
+     * @param BuyableModel $buyable    - the buyable (generally a product) being added to the cart
471 471
      * @param array     $parameters - array of parameters to target a specific order item. eg: group=1, length=5
472 472
      *
473 473
      * @return bool | item | null - successfully removed
@@ -494,9 +494,8 @@  discard block
 block discarded – undo
494 494
     /**
495 495
      * Checks and prepares variables for a quantity change (add, edit, remove) for an Order Item.
496 496
      *
497
-     * @param DataObject    $buyable             - the buyable (generally a product) being added to the cart
498
-     * @param float         $quantity            - number of items add.
499
-     * @param bool          $mustBeExistingItems - if false, the Order Item gets created if it does not exist - if TRUE the order item is searched for and an error shows if there is no Order item.
497
+     * @param BuyableModel    $buyable             - the buyable (generally a product) being added to the cart
498
+     * @param bool          $mustBeExistingItem - if false, the Order Item gets created if it does not exist - if TRUE the order item is searched for and an error shows if there is no Order item.
500 499
      * @param array | Form  $parameters          - array of parameters to target a specific order item. eg: group=1, length=5*
501 500
      *                                           - form saved into item...
502 501
      *
@@ -564,7 +563,7 @@  discard block
 block discarded – undo
564 563
      * we do not need things like "canPurchase" here, because that is with the "addBuyable" method.
565 564
      * NOTE: does not write!
566 565
      *
567
-     * @param DataObject $buyable
566
+     * @param BuyableModel $buyable
568 567
      * @param array      $parameters
569 568
      *
570 569
      * @return OrderItem
@@ -626,7 +625,7 @@  discard block
 block discarded – undo
626 625
     /**
627 626
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
628 627
      *
629
-     * @return bool | null
628
+     * @return boolean|null | null
630 629
      */
631 630
     public function save()
632 631
     {
@@ -690,7 +689,7 @@  discard block
 block discarded – undo
690 689
      *
691 690
      * @param OrderModifier $modifier
692 691
      *
693
-     * @return bool | null
692
+     * @return boolean|null | null
694 693
      */
695 694
     public function removeModifier(OrderModifier $modifier)
696 695
     {
@@ -722,8 +721,9 @@  discard block
 block discarded – undo
722 721
      * returns null if the current user does not allow order manipulation or saving (e.g. session disabled)
723 722
      *
724 723
      * @param Int/ OrderModifier
724
+     * @param integer $modifier
725 725
      *
726
-     * @return bool
726
+     * @return boolean|null
727 727
      */
728 728
     public function addModifier($modifier)
729 729
     {
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
      *
858 858
      * @param string - $countryCode
859 859
      *
860
-     * @return bool
860
+     * @return boolean|null
861 861
      **/
862 862
     public function setCountry($countryCode)
863 863
     {
@@ -879,6 +879,7 @@  discard block
 block discarded – undo
879 879
      * sets region in order so that modifiers can be recalculated, etc...
880 880
      *
881 881
      * @param int | String - $regionID you can use the ID or the code.
882
+     * @param integer $regionID
882 883
      *
883 884
      * @return bool
884 885
      **/
@@ -1021,7 +1022,7 @@  discard block
 block discarded – undo
1021 1022
     /**
1022 1023
      * Stores a message that can later be returned via ajax or to $form->sessionMessage();.
1023 1024
      *
1024
-     * @param $message - the message, which could be a notification of successful action, or reason for failure
1025
+     * @param string $message - the message, which could be a notification of successful action, or reason for failure
1025 1026
      * @param $type - please use good, bad, warning
1026 1027
      */
1027 1028
     public function addMessage($message, $status = 'good')
@@ -1047,7 +1048,7 @@  discard block
 block discarded – undo
1047 1048
     /**
1048 1049
      * Gets an existing order item based on buyable and passed parameters.
1049 1050
      *
1050
-     * @param DataObject $buyable
1051
+     * @param BuyableModel $buyable
1051 1052
      * @param array      $parameters
1052 1053
      *
1053 1054
      * @return OrderItem | null
@@ -1073,7 +1074,7 @@  discard block
 block discarded – undo
1073 1074
     /**
1074 1075
      * Removes parameters that aren't in the default array, merges with default parameters, and converts raw2SQL.
1075 1076
      *
1076
-     * @param array $parameters
1077
+     * @param array $params
1077 1078
      *
1078 1079
      * @return cleaned array
1079 1080
      */
Please login to merge, or discard this patch.