diff --git a/core/lib/Thelia/Condition/ConditionCollection.php b/core/lib/Thelia/Condition/ConditionCollection.php index bedf5b337..0298e510d 100644 --- a/core/lib/Thelia/Condition/ConditionCollection.php +++ b/core/lib/Thelia/Condition/ConditionCollection.php @@ -86,7 +86,7 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * @link http://php.net/manual/en/iterator.valid.php * * @return boolean The return value will be casted to boolean and then evaluated. - * Returns true on success or false on failure. + * Returns true on success or false on failure. */ public function valid() { @@ -114,7 +114,7 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * @link http://php.net/manual/en/countable.count.php * * @return int The custom count as an integer. - * The return value is cast to an integer. + * The return value is cast to an integer. */ public function count() { @@ -126,10 +126,10 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * Whether a offset exists * @link http://php.net/manual/en/arrayaccess.offsetexists.php * @param mixed $offset - * An offset to check for. + * An offset to check for. * * @return boolean true on success or false on failure. - * The return value will be casted to boolean if non-boolean was returned. + * The return value will be casted to boolean if non-boolean was returned. */ public function offsetExists($offset) { @@ -141,7 +141,7 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * Offset to retrieve * @link http://php.net/manual/en/arrayaccess.offsetget.php * @param mixed $offset - * The offset to retrieve. + * The offset to retrieve. * * @return mixed Can return all value types. */ @@ -155,9 +155,9 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * Offset to set * @link http://php.net/manual/en/arrayaccess.offsetset.php * @param mixed $offset - * The offset to assign the value to. + * The offset to assign the value to. * @param mixed $value - * The value to set. + * The value to set. * * @return void */ @@ -175,7 +175,7 @@ class ConditionCollection implements Iterator, Countable, ArrayAccess * Offset to unset * @link http://php.net/manual/en/arrayaccess.offsetunset.php * @param mixed $offset - * The offset to unset. + * The offset to unset. * * @return void */ diff --git a/core/lib/Thelia/Condition/ConditionEvaluator.php b/core/lib/Thelia/Condition/ConditionEvaluator.php index a08ab912a..8e00cfcdb 100644 --- a/core/lib/Thelia/Condition/ConditionEvaluator.php +++ b/core/lib/Thelia/Condition/ConditionEvaluator.php @@ -25,7 +25,6 @@ namespace Thelia\Condition; use Thelia\Condition\Implementation\ConditionInterface; - /** * Validate Conditions * diff --git a/core/lib/Thelia/Condition/ConditionFactory.php b/core/lib/Thelia/Condition/ConditionFactory.php index 9d388a33e..932815110 100644 --- a/core/lib/Thelia/Condition/ConditionFactory.php +++ b/core/lib/Thelia/Condition/ConditionFactory.php @@ -27,7 +27,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Thelia\Condition\Implementation\ConditionInterface; use Thelia\Coupon\FacadeInterface; - /** * Manage how Condition could interact with the current application state (Thelia) * diff --git a/core/lib/Thelia/Condition/Implementation/ConditionAbstract.php b/core/lib/Thelia/Condition/Implementation/ConditionAbstract.php index 9b5b218f2..c5f7ebb91 100644 --- a/core/lib/Thelia/Condition/Implementation/ConditionAbstract.php +++ b/core/lib/Thelia/Condition/Implementation/ConditionAbstract.php @@ -23,7 +23,6 @@ namespace Thelia\Condition\Implementation; - use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\Operators; use Thelia\Condition\SerializableCondition; diff --git a/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php b/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php index 74570cc41..560ee44c8 100644 --- a/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php +++ b/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php @@ -25,7 +25,6 @@ namespace Thelia\Condition\Implementation; use InvalidArgumentException; - /** * Allow every one, perform no check * diff --git a/core/lib/Thelia/Condition/Implementation/MatchForTotalAmount.php b/core/lib/Thelia/Condition/Implementation/MatchForTotalAmount.php index ec42d5d86..272ec0a84 100644 --- a/core/lib/Thelia/Condition/Implementation/MatchForTotalAmount.php +++ b/core/lib/Thelia/Condition/Implementation/MatchForTotalAmount.php @@ -23,7 +23,6 @@ namespace Thelia\Condition\Implementation; - use Thelia\Condition\Operators; use Thelia\Exception\InvalidConditionOperatorException; use Thelia\Model\Currency; diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index 116d5ff26..30ee37104 100644 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -266,8 +266,9 @@ class BaseAdminController extends BaseController /** * Redirect to à route ID related URL * - * @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml - * @param unknown $urlParameters the URL parametrs, as a var/value pair array + * @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml + * @param array|\Thelia\Controller\Admin\unknown $urlParameters the URL parametrs, as a var/value pair array + * @param array $routeParameters */ public function redirectToRoute($routeId, array $urlParameters = array(), array $routeParameters = array()) { diff --git a/core/lib/Thelia/Controller/BaseController.php b/core/lib/Thelia/Controller/BaseController.php index 71a099929..e8243d0e4 100644 --- a/core/lib/Thelia/Controller/BaseController.php +++ b/core/lib/Thelia/Controller/BaseController.php @@ -259,6 +259,8 @@ abstract class BaseController extends ContainerAware * redirect request to the specified url * * @param string $url + * @param int $status http status. Must be a 30x status + * @param array $cookies */ public function redirect($url, $status = 302, $cookies = array()) { diff --git a/core/lib/Thelia/Controller/Front/BaseFrontController.php b/core/lib/Thelia/Controller/Front/BaseFrontController.php index d0c6b52f6..00ac8143d 100644 --- a/core/lib/Thelia/Controller/Front/BaseFrontController.php +++ b/core/lib/Thelia/Controller/Front/BaseFrontController.php @@ -48,8 +48,9 @@ class BaseFrontController extends BaseController /** * Redirect to à route ID related URL * - * @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml - * @param unknown $urlParameters the URL parametrs, as a var/value pair array + * @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml + * @param array|\Thelia\Controller\Front\unknown $urlParameters the URL parametrs, as a var/value pair array + * @param bool $referenceType */ public function redirectToRoute($routeId, $urlParameters = array(), $referenceType = Router::ABSOLUTE_PATH) { diff --git a/core/lib/Thelia/Core/Event/Newsletter/NewsletterEvent.php b/core/lib/Thelia/Core/Event/Newsletter/NewsletterEvent.php index 5a36bf25c..3994d265f 100644 --- a/core/lib/Thelia/Core/Event/Newsletter/NewsletterEvent.php +++ b/core/lib/Thelia/Core/Event/Newsletter/NewsletterEvent.php @@ -85,7 +85,6 @@ class NewsletterEvent extends ActionEvent return $this->newsletter; } - /** * @param string $email * diff --git a/core/lib/Thelia/Core/Event/Order/OrderManualEvent.php b/core/lib/Thelia/Core/Event/Order/OrderManualEvent.php index da48db139..dc5f0b155 100644 --- a/core/lib/Thelia/Core/Event/Order/OrderManualEvent.php +++ b/core/lib/Thelia/Core/Event/Order/OrderManualEvent.php @@ -37,7 +37,11 @@ class OrderManualEvent extends OrderEvent protected $customer = null; /** - * @param Order $order + * @param \Thelia\Model\Order $order + * @param \Thelia\Model\Currency $currency + * @param \Thelia\Model\Lang $lang + * @param \Thelia\Model\Cart $cart + * @param \Thelia\Model\Customer $customer */ public function __construct(Order $order, Currency $currency, Lang $lang, Cart $cart, Customer $customer) { diff --git a/core/lib/Thelia/Core/Event/ShippingZone/ShippingZoneAddAreaEvent.php b/core/lib/Thelia/Core/Event/ShippingZone/ShippingZoneAddAreaEvent.php index 5329aff12..dfe1b33cd 100644 --- a/core/lib/Thelia/Core/Event/ShippingZone/ShippingZoneAddAreaEvent.php +++ b/core/lib/Thelia/Core/Event/ShippingZone/ShippingZoneAddAreaEvent.php @@ -61,7 +61,7 @@ class ShippingZoneAddAreaEvent extends ActionEvent } /** - * @param mixed $shopping_zone_id + * @param mixed $shipping_zone_id * * @return $this */ diff --git a/core/lib/Thelia/Core/EventListener/ViewListener.php b/core/lib/Thelia/Core/EventListener/ViewListener.php index 59484eed3..0e57bdaf7 100644 --- a/core/lib/Thelia/Core/EventListener/ViewListener.php +++ b/core/lib/Thelia/Core/EventListener/ViewListener.php @@ -51,13 +51,13 @@ class ViewListener implements EventSubscriberInterface { /** * - * @var Symfony\Component\DependencyInjection\ContainerInterface + * @var \Symfony\Component\DependencyInjection\ContainerInterface */ private $container; /** * - * @param \Thelia\Core\Template\ParserInterface $parser + * @param \Symfony\Component\DependencyInjection\ContainerInterfac $container */ public function __construct(ContainerInterface $container) { diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index bcc337374..e6a795de9 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -256,7 +256,7 @@ class TheliaLoop extends AbstractSmartyPlugin if ($content === null) { $page = $pagination->getPage(); - if($maxPage > ($page + $nbPage)) { + if ($maxPage > ($page + $nbPage)) { $end = $page + $nbPage; } else { $end = $maxPage; diff --git a/core/lib/Thelia/Model/AdminLog.php b/core/lib/Thelia/Model/AdminLog.php index b991d0f76..71d4f6a23 100644 --- a/core/lib/Thelia/Model/AdminLog.php +++ b/core/lib/Thelia/Model/AdminLog.php @@ -12,11 +12,12 @@ class AdminLog extends BaseAdminLog /** * A simple helper to insert an entry in the admin log * - * @param $resource - * @param $action - * @param $message + * @param $resource + * @param $action + * @param $message * @param Request $request * @param Base\Admin $adminUser + * @param bool $withRequestContent */ public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null, $withRequestContent = true) { diff --git a/core/lib/Thelia/Model/Customer.php b/core/lib/Thelia/Model/Customer.php index ed0a3707b..4d4b3ebfa 100644 --- a/core/lib/Thelia/Model/Customer.php +++ b/core/lib/Thelia/Model/Customer.php @@ -33,24 +33,27 @@ class Customer extends BaseCustomer implements UserInterface use \Thelia\Model\Tools\ModelEventDispatcherTrait; /** - * @param int $titleId customer title id (from customer_title table) - * @param string $firstname customer first name - * @param string $lastname customer last name - * @param string $address1 customer address - * @param string $address2 customer adress complement 1 - * @param string $address3 customer adress complement 2 - * @param string $phone customer phone number - * @param string $cellphone customer cellphone number - * @param string $zipcode customer zipcode - * @param string $city - * @param int $countryId customer country id (from Country table) - * @param string $email customer email, must be unique - * @param string $plainPassword customer plain password, hash is made calling setPassword method. Not mandatory parameter but an exception is thrown if customer is new without password - * @param string $lang - * @param int $reseller - * @param null $sponsor - * @param int $discount - * @throws \Exception|\Symfony\Component\Config\Definition\Exception\Exception + * @param int $titleId customer title id (from customer_title table) + * @param string $firstname customer first name + * @param string $lastname customer last name + * @param string $address1 customer address + * @param string $address2 customer adress complement 1 + * @param string $address3 customer adress complement 2 + * @param string $phone customer phone number + * @param string $cellphone customer cellphone number + * @param string $zipcode customer zipcode + * @param string $city + * @param int $countryId customer country id (from Country table) + * @param string $email customer email, must be unique + * @param string $plainPassword customer plain password, hash is made calling setPassword method. Not mandatory parameter but an exception is thrown if customer is new without password + * @param string $lang + * @param int $reseller + * @param null $sponsor + * @param int $discount + * @param null $company + * @param null $ref + * @throws \Exception + * @throws \Propel\Runtime\Exception\PropelException */ public function createOrUpdate($titleId, $firstname, $lastname, $address1, $address2, $address3, $phone, $cellphone, $zipcode, $city, $countryId, $email = null, $plainPassword = null, $lang = null, $reseller = 0, $sponsor = null, $discount = 0, $company = null, $ref = null) { diff --git a/core/lib/Thelia/Model/Order.php b/core/lib/Thelia/Model/Order.php index fd7c2c450..f4b1b5abc 100644 --- a/core/lib/Thelia/Model/Order.php +++ b/core/lib/Thelia/Model/Order.php @@ -45,13 +45,12 @@ class Order extends BaseOrder return uniqid('ORD', true); } - /** * Compute this order amount. * - * @param float $tax (output only) returns the tax amount for this order - * @param bool $includePostage if true, the postage cost is included to the total - * @param bool $includeDiscount if true, the discount will be included to the total + * @param float $tax (output only) returns the tax amount for this order + * @param bool $includePostage if true, the postage cost is included to the total + * @param bool $includeDiscount if true, the discount will be included to the total * @return float */ public function getTotalAmount(&$tax = 0, $includePostage = true, $includeDiscount = true) @@ -98,7 +97,8 @@ class Order extends BaseOrder /** * Set the status of the current order to NOT PAID */ - public function setNotPaid() { + public function setNotPaid() + { $this->setStatusHelper(OrderStatus::CODE_NOT_PAID); } @@ -107,14 +107,16 @@ class Order extends BaseOrder * * @return bool true if this order is NOT PAID, false otherwise. */ - public function isNotPaid() { + public function isNotPaid() + { return $this->hasStatusHelper(OrderStatus::CODE_NOT_PAID); } /** * Set the status of the current order to PAID */ - public function setPaid() { + public function setPaid() + { $this->setStatusHelper(OrderStatus::CODE_PAID); } @@ -123,14 +125,16 @@ class Order extends BaseOrder * * @return bool true if this order is PAID, false otherwise. */ - public function isPaid() { + public function isPaid() + { return $this->hasStatusHelper(OrderStatus::CODE_PAID); } /** * Set the status of the current order to PROCESSING */ - public function setProcessing() { + public function setProcessing() + { $this->setStatusHelper(OrderStatus::CODE_PROCESSING); } @@ -139,14 +143,16 @@ class Order extends BaseOrder * * @return bool true if this order is PROCESSING, false otherwise. */ - public function isProcessing() { + public function isProcessing() + { return $this->hasStatusHelper(OrderStatus::CODE_PROCESSING); } /** * Set the status of the current order to SENT */ - public function setSent() { + public function setSent() + { $this->setStatusHelper(OrderStatus::CODE_SENT); } @@ -155,14 +161,16 @@ class Order extends BaseOrder * * @return bool true if this order is SENT, false otherwise. */ - public function isSent() { + public function isSent() + { return $this->hasStatusHelper(OrderStatus::CODE_SENT); } /** * Set the status of the current order to CANCELED */ - public function setCancelled() { + public function setCancelled() + { $this->setStatusHelper(OrderStatus::CODE_CANCELED); } @@ -171,7 +179,8 @@ class Order extends BaseOrder * * @return bool true if this order is CANCELED, false otherwise. */ - public function isCancelled() { + public function isCancelled() + { return $this->hasStatusHelper(OrderStatus::CODE_CANCELED); } @@ -180,7 +189,8 @@ class Order extends BaseOrder * * @param string $statusCode the status code, one of OrderStatus::CODE_xxx constants. */ - public function setStatusHelper($statusCode) { + public function setStatusHelper($statusCode) + { if (null !== $ordeStatus = OrderStatusQuery::create()->findOneByCode($statusCode)) { $this->setOrderStatus($ordeStatus)->save(); } @@ -189,10 +199,11 @@ class Order extends BaseOrder /** * Check if the current status of this order is $statusCode * - * @param string $statusCode the status code, one of OrderStatus::CODE_xxx constants. - * @return bool true if this order have the provided status, false otherwise. + * @param string $statusCode the status code, one of OrderStatus::CODE_xxx constants. + * @return bool true if this order have the provided status, false otherwise. */ - public function hasStatusHelper($statusCode) { + public function hasStatusHelper($statusCode) + { return $this->getOrderStatus()->getCode() == $statusCode; } diff --git a/core/lib/Thelia/Model/TaxRule.php b/core/lib/Thelia/Model/TaxRule.php index f9bc52d2e..f766d59fc 100644 --- a/core/lib/Thelia/Model/TaxRule.php +++ b/core/lib/Thelia/Model/TaxRule.php @@ -12,9 +12,10 @@ class TaxRule extends BaseTaxRule use ModelEventDispatcherTrait; /** + * @param Product $product * @param Country $country - * @param $untaxedAmount - * @param $untaxedPromoAmount + * @param $untaxedAmount + * @param $untaxedPromoAmount * @param null $askedLocale * * @return OrderProductTaxCollection diff --git a/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php b/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php index 8b4b57a2b..bc2f72889 100644 --- a/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php +++ b/core/lib/Thelia/Model/Tools/ModelCriteriaTools.php @@ -23,6 +23,7 @@ class ModelCriteriaTools * @param array $columns * @param null $foreignTable * @param string $foreignKey + * @param bool $forceReturn */ public static function getFrontEndI18n(ModelCriteria &$search, $requestedLocale, $columns, $foreignTable, $foreignKey, $forceReturn = false) {