Conditions | 91 |
Paths | > 20000 |
Total Lines | 406 |
Code Lines | 222 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.
There are several approaches to avoid long parameter lists:
1 | <?php |
||
417 | public function computeCart( |
||
418 | &$cartForTemplate, |
||
419 | &$emptyCart, |
||
420 | &$shippingAmount, |
||
421 | &$commandAmount, |
||
422 | &$vatAmount, |
||
423 | &$goOn, |
||
424 | &$commandAmountTTC, |
||
425 | &$discountsDescription, |
||
426 | &$discountsCount, |
||
427 | &$checkoutAttributes)// B.R. |
||
428 | |||
429 | { |
||
430 | $emptyCart = false; |
||
431 | $goOn = ''; |
||
432 | $vats = []; |
||
433 | $cpt = 0; |
||
434 | $discountsCount = 0; |
||
435 | $this->cart = isset($_SESSION[Oledrion\CaddyHandler::CADDY_NAME]) ? $_SESSION[Oledrion\CaddyHandler::CADDY_NAME] : []; |
||
436 | $cartCount = count($this->cart); |
||
437 | if (0 == $cartCount) { |
||
438 | $emptyCart = true; |
||
439 | |||
440 | return true; |
||
441 | } |
||
442 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
443 | $commandsHandler = new Oledrion\CommandsHandler($db); |
||
444 | $attributesHandler = new Oledrion\AttributesHandler($db); |
||
445 | $categoryHandler = new Oledrion\CategoryHandler($db); |
||
446 | |||
447 | // Réinitialisation des données privées |
||
448 | $this->initializePrivateData(); |
||
449 | // Chargement des objets produits associés aux produits du panier et calcul des quantités par catégorie |
||
450 | $this->loadProductsAssociatedToCart(); |
||
451 | // Chargement des TVA |
||
452 | if (!isset($_POST['cmd_country']) || empty($_POST['cmd_country'])) { |
||
453 | $_POST['cmd_country'] = OLEDRION_DEFAULT_COUNTRY; |
||
454 | } |
||
455 | $vatHandler = new Oledrion\VatHandler($db); |
||
456 | $vats = $vatHandler->getCountryVats($_POST['cmd_country']); |
||
457 | $oledrionCurrency = Oledrion\Currency::getInstance(); |
||
458 | $caddyCount = count($this->cart); |
||
459 | |||
460 | // Initialisation des totaux généraux (ht, tva et frais de port) |
||
461 | $totalHT = $totalVAT = $totalShipping = 0.0; |
||
462 | |||
463 | // Boucle sur tous les produits et sur chacune des règles pour calculer le prix du produit (et ses frais de port) et voir si on doit y appliquer une réduction |
||
464 | foreach ($this->cart as $cartProduct) { |
||
465 | if ((float)$cartProduct['product']->getVar('product_discount_price', 'n') > 0) { |
||
466 | $ht = (float)$cartProduct['product']->getVar('product_discount_price', 'n'); |
||
467 | } else { |
||
468 | $ht = (float)$cartProduct['product']->getVar('product_price', 'n'); |
||
469 | } |
||
470 | // S'il y a des options, on rajoute leur montant |
||
471 | $productAttributes = []; |
||
472 | if (is_array($cartProduct['attributes']) && count($cartProduct['attributes']) > 0) { |
||
473 | $ht += $attributesHandler->getProductOptionsPrice($cartProduct['attributes'], $cartProduct['product']->getVar('product_vat_id'), $productAttributes); |
||
474 | } |
||
475 | |||
476 | $discountedPrice = $ht; |
||
477 | $quantity = (int)$cartProduct['qty']; |
||
478 | |||
479 | if (Oledrion\Utility::getModuleOption('shipping_quantity')) { |
||
480 | $discountedShipping = (float)($cartProduct['product']->getVar('product_shipping_price', 'n') * $quantity); |
||
481 | } else { |
||
482 | $discountedShipping = (float)$cartProduct['product']->getVar('product_shipping_price', 'n'); |
||
483 | } |
||
484 | $totalPrice = 0.0; |
||
485 | $reduction = ''; |
||
486 | |||
487 | // B.R. Start |
||
488 | // If any product in cart does not skip optional checkout step, need to perform |
||
489 | if (0 == $cartProduct['product']->getVar('skip_packing', 'n')) { |
||
490 | $checkoutAttributes['skip_packing'] = 0; |
||
491 | } |
||
492 | if (0 == $cartProduct['product']->getVar('skip_location', 'n')) { |
||
493 | $checkoutAttributes['skip_location'] = 0; |
||
494 | } |
||
495 | if (0 == $cartProduct['product']->getVar('skip_delivery', 'n')) { |
||
496 | $checkoutAttributes['skip_delivery'] = 0; |
||
497 | } |
||
498 | // B.R. End |
||
499 | |||
500 | ++$cpt; |
||
501 | if ($cpt == $caddyCount) { |
||
502 | // On arrive sur le dernier produit |
||
503 | $category = null; |
||
504 | //mb $category = $this->handlers->h_oledrion_cat->get($cartProduct['product']->getVar('product_cid')); |
||
505 | $category = $categoryHandler->get($cartProduct['product']->getVar('product_cid')); |
||
506 | if (is_object($category)) { |
||
507 | $goOn = $category->getLink(); |
||
508 | } |
||
509 | } |
||
510 | |||
511 | // Boucle sur les règles |
||
512 | foreach ($this->allActiveRules as $rule) { |
||
513 | $applyRule = false; |
||
514 | if (0 == $rule->disc_group || (0 != $rule->disc_group && Oledrion\Utility::isMemberOfGroup($rule->disc_group))) { |
||
515 | if (0 == $rule->disc_cat_cid || (0 != $rule->disc_cat_cid && $cartProduct['product']->getVar('product_cid') == $rule->disc_cat_cid)) { |
||
516 | if (0 == $rule->disc_vendor_id || (0 != $rule->disc_vendor_id && $cartProduct['product']->getVar('disc_vendor_id') == $rule->disc_vendor_id)) { |
||
517 | if (0 == $rule->disc_product_id || (0 != $rule->disc_product_id && $cartProduct['product']->getVar('product_id') == $rule->disc_product_id)) { |
||
518 | // Dans quel cas appliquer la réduction ? |
||
519 | switch ($rule->disc_price_case) { |
||
520 | case Constants::OLEDRION_DISCOUNT_PRICE_CASE_ALL: |
||
521 | // Dans tous les cas |
||
522 | |||
523 | $applyRule = true; |
||
524 | |||
525 | break; |
||
526 | case Constants::OLEDRION_DISCOUNT_PRICE_CASE_FIRST_BUY: |
||
527 | // Si c'est le premier achat de l'utilisateur sur le site |
||
528 | |||
529 | if ($commandsHandler->isFirstCommand()) { |
||
530 | $applyRule = true; |
||
531 | } |
||
532 | |||
533 | break; |
||
534 | case Constants::OLEDRION_DISCOUNT_PRICE_CASE_PRODUCT_NEVER: |
||
535 | // Si le produit n'a jamais été acheté par le client |
||
536 | |||
537 | if (!$commandsHandler->productAlreadyBought(0, $cartProduct['product']->getVar('product_id'))) { |
||
538 | $applyRule = true; |
||
539 | } |
||
540 | |||
541 | break; |
||
542 | case Constants::OLEDRION_DISCOUNT_PRICE_CASE_QTY_IS: |
||
543 | // Si la quantité de produit est ... à ... |
||
544 | |||
545 | switch ($rule->disc_price_case_qty_cond) { |
||
546 | case Constants::OLEDRION_DISCOUNT_PRICE_QTY_COND1: |
||
547 | // > |
||
548 | |||
549 | if ($cartProduct['qty'] > $rule->disc_price_case_qty_value) { |
||
550 | $applyRule = true; |
||
551 | } |
||
552 | |||
553 | break; |
||
554 | case Constants::OLEDRION_DISCOUNT_PRICE_QTY_COND2: |
||
555 | // >= |
||
556 | |||
557 | if ($cartProduct['qty'] >= $rule->disc_price_case_qty_value) { |
||
558 | $applyRule = true; |
||
559 | } |
||
560 | |||
561 | break; |
||
562 | case Constants::OLEDRION_DISCOUNT_PRICE_QTY_COND3: |
||
563 | // < |
||
564 | |||
565 | if ($cartProduct['qty'] < $rule->disc_price_case_qty_value) { |
||
566 | $applyRule = true; |
||
567 | } |
||
568 | |||
569 | break; |
||
570 | case Constants::OLEDRION_DISCOUNT_PRICE_QTY_COND4: |
||
571 | // <= |
||
572 | |||
573 | if ($cartProduct['qty'] <= $rule->disc_price_case_qty_value) { |
||
574 | $applyRule = true; |
||
575 | } |
||
576 | |||
577 | break; |
||
578 | case Constants::OLEDRION_DISCOUNT_PRICE_QTY_COND5: |
||
579 | // == |
||
580 | |||
581 | if ($cartProduct['qty'] == $rule->disc_price_case_qty_value) { |
||
582 | $applyRule = true; |
||
583 | } |
||
584 | |||
585 | break; |
||
586 | } |
||
587 | } |
||
588 | } |
||
589 | } |
||
590 | } |
||
591 | } |
||
592 | if ($applyRule) { |
||
593 | // Il faut appliquer la règle |
||
594 | // On calcule le nouveau prix ht du produit |
||
595 | switch ($rule->disc_price_type) { |
||
596 | case Constants::OLEDRION_DISCOUNT_PRICE_TYPE1: |
||
597 | // Montant dégressif selon les quantités |
||
598 | |||
599 | if ($quantity >= $rule->disc_price_degress_l1qty1 && $quantity <= $rule->disc_price_degress_l1qty2) { |
||
600 | $discountedPrice = (float)$rule->getVar('disc_price_degress_l1total', 'n'); |
||
601 | } |
||
602 | if ($quantity >= $rule->disc_price_degress_l2qty1 && $quantity <= $rule->disc_price_degress_l2qty2) { |
||
603 | $discountedPrice = (float)$rule->getVar('disc_price_degress_l2total', 'n'); |
||
604 | } |
||
605 | if ($quantity >= $rule->disc_price_degress_l3qty1 && $quantity <= $rule->disc_price_degress_l3qty2) { |
||
606 | $discountedPrice = (float)$rule->getVar('disc_price_degress_l3total', 'n'); |
||
607 | } |
||
608 | if ($quantity >= $rule->disc_price_degress_l4qty1 && $quantity <= $rule->disc_price_degress_l4qty2) { |
||
609 | $discountedPrice = (float)$rule->getVar('disc_price_degress_l4total', 'n'); |
||
610 | } |
||
611 | if ($quantity >= $rule->disc_price_degress_l5qty1 && $quantity <= $rule->disc_price_degress_l5qty2) { |
||
612 | $discountedPrice = (float)$rule->getVar('disc_price_degress_l5total', 'n'); |
||
613 | } |
||
614 | $reduction = $rule->disc_description; |
||
615 | ++$discountsCount; |
||
616 | |||
617 | break; |
||
618 | case Constants::OLEDRION_DISCOUNT_PRICE_TYPE2: |
||
619 | // D'un montant ou d'un pourcentage |
||
620 | |||
621 | if (Constants::OLEDRION_DISCOUNT_PRICE_AMOUNT_ON_PRODUCT == $rule->disc_price_amount_on) { |
||
622 | // Réduction sur le produit |
||
623 | if (Constants::OLEDRION_DISCOUNT_PRICE_REDUCE_PERCENT == $rule->disc_price_amount_type) { |
||
624 | // Réduction en pourcentage |
||
625 | $discountedPrice = $this->getDiscountedPrice($discountedPrice, $rule->getVar('disc_price_amount_amount', 'n')); |
||
626 | } elseif (Constants::OLEDRION_DISCOUNT_PRICE_REDUCE_MONEY == $rule->disc_price_amount_type) { |
||
627 | // Réduction d'un montant en euros |
||
628 | $discountedPrice -= (float)$rule->getVar('disc_price_amount_amount', 'n'); |
||
629 | } |
||
630 | |||
631 | // Pas de montants négatifs |
||
632 | Oledrion\Utility::doNotAcceptNegativeAmounts($discountedPrice); |
||
633 | $reduction = $rule->disc_description; |
||
634 | ++$discountsCount; |
||
635 | } elseif (Constants::OLEDRION_DISCOUNT_PRICE_AMOUNT_ON_CART == $rule->disc_price_amount_on) { |
||
636 | // Règle à appliquer sur le panier |
||
637 | if (!isset($this->rulesForTheWhole[$rule->disc_id])) { |
||
638 | $this->rulesForTheWhole[$rule->disc_id] = $rule; |
||
639 | } |
||
640 | } |
||
641 | |||
642 | break; |
||
643 | } |
||
644 | |||
645 | // On passe au montant des frais de port |
||
646 | switch ($rule->disc_shipping_type) { |
||
647 | case Constants::OLEDRION_DISCOUNT_SHIPPING_TYPE1: |
||
648 | // A payer dans leur intégralité, rien à faire |
||
649 | |||
650 | break; |
||
651 | case Constants::OLEDRION_DISCOUNT_SHIPPING_TYPE2: |
||
652 | // Totalement gratuits si le client commande plus de X euros d'achat |
||
653 | |||
654 | if ($this->totalAmountBeforeDiscounts > $rule->disc_shipping_free_morethan) { |
||
655 | $discountedShipping = 0.0; |
||
656 | } |
||
657 | |||
658 | break; |
||
659 | case Constants::OLEDRION_DISCOUNT_SHIPPING_TYPE3: |
||
660 | // Frais de port réduits de X euros si la commande est > x |
||
661 | |||
662 | if ($this->totalAmountBeforeDiscounts > $rule->disc_shipping_reduce_cartamount) { |
||
663 | $discountedShipping -= (float)$rule->getVar('disc_shipping_reduce_amount', 'n'); |
||
664 | } |
||
665 | // Pas de montants négatifs |
||
666 | Oledrion\Utility::doNotAcceptNegativeAmounts($discountedShipping); |
||
667 | |||
668 | break; |
||
669 | case Constants::OLEDRION_DISCOUNT_SHIPPING_TYPE4: |
||
670 | // Frais de port dégressifs |
||
671 | |||
672 | if ($quantity >= $rule->disc_shipping_degress_l1qty1 && $quantity <= $rule->disc_shipping_degress_l1qty2) { |
||
673 | $discountedShipping = (float)$rule->getVar('disc_shipping_degress_l1total', 'n'); |
||
674 | } |
||
675 | if ($quantity >= $rule->disc_shipping_degress_l2qty1 && $quantity <= $rule->disc_shipping_degress_l2qty2) { |
||
676 | $discountedShipping = (float)$rule->getVar('disc_shipping_degress_l2total', 'n'); |
||
677 | } |
||
678 | if ($quantity >= $rule->disc_shipping_degress_l3qty1 && $quantity <= $rule->disc_shipping_degress_l3qty2) { |
||
679 | $discountedShipping = (float)$rule->getVar('disc_shipping_degress_l3total', 'n'); |
||
680 | } |
||
681 | if ($quantity >= $rule->disc_shipping_degress_l4qty1 && $quantity <= $rule->disc_shipping_degress_l4qty2) { |
||
682 | $discountedShipping = (float)$rule->getVar('disc_shipping_degress_l4total', 'n'); |
||
683 | } |
||
684 | if ($quantity >= $rule->disc_shipping_degress_l5qty1 && $quantity <= $rule->disc_shipping_degress_l5qty2) { |
||
685 | $discountedShipping = (float)$rule->getVar('disc_shipping_degress_l5total', 'n'); |
||
686 | } |
||
687 | |||
688 | break; |
||
689 | } // Sélection du type de réduction sur les frais de port |
||
690 | } // Il faut appliquer la règle de réduction |
||
691 | }// Boucle sur les réductions |
||
692 | |||
693 | // Calcul de la TVA du produit |
||
694 | $vatId = $cartProduct['product']->getVar('product_vat_id'); |
||
695 | if (is_array($vats) && isset($vats[$vatId])) { |
||
696 | $vatRate = (float)$vats[$vatId]->getVar('vat_rate', 'n'); |
||
697 | $vatAmount = Oledrion\Utility::getVAT($discountedPrice * $quantity, $vatRate); |
||
698 | } else { |
||
699 | $vatRate = 0.0; |
||
700 | $vatAmount = 0.0; |
||
701 | } |
||
702 | |||
703 | // Calcul du TTC du produit ((ht * qte) + tva + frais de port) |
||
704 | $totalPrice = (($discountedPrice * $quantity) + $vatAmount + $discountedShipping); |
||
705 | |||
706 | // Les totaux généraux |
||
707 | $totalHT += ($discountedPrice * $quantity); |
||
708 | $totalVAT += $vatAmount; |
||
709 | $totalShipping += $discountedShipping; |
||
710 | |||
711 | // Recherche des éléments associés au produit |
||
712 | $associatedVendor = $associatedCategory = $associatedManufacturers = []; |
||
713 | $manufacturersJoinList = ''; |
||
714 | // Le vendeur |
||
715 | if (isset($this->associatedVendors[$cartProduct['product']->product_vendor_id])) { |
||
716 | $associatedVendor = $this->associatedVendors[$cartProduct['product']->product_vendor_id]->toArray(); |
||
717 | } |
||
718 | |||
719 | // La catégorie |
||
720 | if (isset($this->associatedCategories[$cartProduct['product']->product_cid])) { |
||
721 | $associatedCategory = $this->associatedCategories[$cartProduct['product']->product_cid]->toArray(); |
||
722 | } |
||
723 | |||
724 | // Les fabricants |
||
725 | $product_id = $cartProduct['product']->product_id; |
||
726 | if (isset($this->associatedManufacturersPerProduct[$product_id])) { |
||
727 | // Recherche de la liste des fabricants associés à ce produit |
||
728 | $manufacturers = $this->associatedManufacturersPerProduct[$product_id]; |
||
729 | $manufacturersList = []; |
||
730 | foreach ($manufacturers as $manufacturer_id) { |
||
731 | if (isset($this->associatedManufacturers[$manufacturer_id])) { |
||
732 | $associatedManufacturers[] = $this->associatedManufacturers[$manufacturer_id]->toArray(); |
||
733 | } |
||
734 | $manufacturersList[] = $this->associatedManufacturers[$manufacturer_id]->manu_commercialname . ' ' . $this->associatedManufacturers[$manufacturer_id]->manu_name; |
||
735 | } |
||
736 | $manufacturersJoinList = implode(OLEDRION_STRING_TO_JOIN_MANUFACTURERS, $manufacturersList); |
||
737 | } |
||
738 | $productTemplate = []; |
||
739 | $productTemplate = $cartProduct['product']->toArray(); |
||
740 | $productTemplate['attributes'] = $productAttributes; |
||
741 | $productTemplate['number'] = $cartProduct['number']; |
||
742 | $productTemplate['id'] = $cartProduct['id']; |
||
743 | $productTemplate['product_qty'] = $cartProduct['qty']; |
||
744 | |||
745 | $productTemplate['unitBasePrice'] = $ht; |
||
746 | // Prix unitaire HT SANS réduction |
||
747 | $productTemplate['discountedPrice'] = $discountedPrice; |
||
748 | // Prix unitaire HT AVEC réduction |
||
749 | $productTemplate['discountedPriceWithQuantity'] = $discountedPrice * $quantity; |
||
750 | // Prix HT AVEC réduction et la quantité |
||
751 | // Les même prix mais formatés |
||
752 | $productTemplate['unitBasePriceFormated'] = $oledrionCurrency->amountForDisplay($ht); |
||
753 | // Prix unitaire HT SANS réduction |
||
754 | $productTemplate['discountedPriceFormated'] = $oledrionCurrency->amountForDisplay($discountedPrice); |
||
755 | // Prix unitaire HT AVEC réduction |
||
756 | $productTemplate['discountedPriceWithQuantityFormated'] = $oledrionCurrency->amountForDisplay($discountedPrice * $quantity); |
||
757 | // Prix HT AVEC réduction et la quantité |
||
758 | |||
759 | // Add by voltan |
||
760 | $productTemplate['discountedPriceFormatedOrg'] = $oledrionCurrency->amountForDisplay($ht - $discountedPrice); |
||
761 | $productTemplate['discountedPriceOrg'] = $ht - $discountedPrice; |
||
762 | |||
763 | $productTemplate['vatRate'] = $oledrionCurrency->amountInCurrency($vatRate); |
||
764 | $productTemplate['vatAmount'] = $vatAmount; |
||
765 | $productTemplate['normalShipping'] = $cartProduct['product']->getVar('product_shipping_price', 'n'); |
||
766 | $productTemplate['discountedShipping'] = $discountedShipping; |
||
767 | $productTemplate['totalPrice'] = $totalPrice; |
||
768 | $productTemplate['reduction'] = $reduction; |
||
769 | $productTemplate['templateProduct'] = $cartProduct['product']->toArray(); |
||
770 | |||
771 | $productTemplate['vatAmountFormated'] = $oledrionCurrency->amountInCurrency($vatAmount); |
||
772 | $productTemplate['normalShippingFormated'] = $oledrionCurrency->amountForDisplay($cartProduct['product']->getVar('product_shipping_price', 'n')); |
||
773 | $productTemplate['discountedShippingFormated'] = $oledrionCurrency->amountForDisplay($discountedShipping); |
||
774 | $productTemplate['totalPriceFormated'] = $oledrionCurrency->amountForDisplay($totalPrice); |
||
775 | $productTemplate['templateCategory'] = $associatedCategory; |
||
776 | $productTemplate['templateVendor'] = $associatedVendor; |
||
777 | $productTemplate['templateManufacturers'] = $associatedManufacturers; |
||
778 | $productTemplate['manufacturersJoinList'] = $manufacturersJoinList; |
||
779 | $this->cartForTemplate[] = $productTemplate; |
||
780 | }// foreach sur les produits du panier |
||
781 | |||
782 | // Traitement des règles générales s'il y en a |
||
783 | if (count($this->rulesForTheWhole) > 0) { |
||
784 | // $discountsDescription |
||
785 | foreach ($this->rulesForTheWhole as $rule) { |
||
786 | switch ($rule->disc_price_type) { |
||
787 | case Constants::OLEDRION_DISCOUNT_PRICE_TYPE2: |
||
788 | // D'un montant ou d'un pourcentage |
||
789 | |||
790 | if (Constants::OLEDRION_DISCOUNT_PRICE_AMOUNT_ON_CART == $rule->disc_price_amount_on) { |
||
791 | // Règle à appliquer sur le panier |
||
792 | if (Constants::OLEDRION_DISCOUNT_PRICE_REDUCE_PERCENT == $rule->disc_price_amount_type) { |
||
793 | // Réduction en pourcentage |
||
794 | $totalHT = $this->getDiscountedPrice($totalHT, $rule->getVar('disc_price_amount_amount')); |
||
795 | $totalVAT = $this->getDiscountedPrice($totalVAT, $rule->getVar('disc_price_amount_amount')); |
||
796 | } elseif (Constants::OLEDRION_DISCOUNT_PRICE_REDUCE_MONEY == $rule->disc_price_amount_type) { |
||
797 | // Réduction d'un montant en euros |
||
798 | $totalHT -= (float)$rule->getVar('disc_price_amount_amount'); |
||
799 | $totalVAT -= (float)$rule->getVar('disc_price_amount_amount'); |
||
800 | } |
||
801 | |||
802 | // Pas de montants négatifs |
||
803 | Oledrion\Utility::doNotAcceptNegativeAmounts($totalHT); |
||
804 | Oledrion\Utility::doNotAcceptNegativeAmounts($totalVAT); |
||
805 | $discountsDescription[] = $rule->disc_description; |
||
806 | ++$discountsCount; |
||
807 | }// Règle à appliquer sur le panier |
||
808 | |||
809 | break; |
||
810 | } // Switch |
||
811 | } // Foreach |
||
812 | }// S'il y a des règles globales |
||
813 | // Les totaux "renvoyés" à l'appelant |
||
814 | $shippingAmount = $totalShipping; |
||
815 | $commandAmount = $totalHT; |
||
816 | |||
817 | $vatAmount = $totalVAT; |
||
818 | $commandAmountTTC = $totalHT + $totalVAT + $totalShipping; |
||
819 | |||
820 | $cartForTemplate = $this->cartForTemplate; |
||
821 | |||
822 | return true; |
||
823 | } |
||
825 |