update phpDoc and fix cs

This commit is contained in:
Manuel Raynaud
2014-03-05 15:12:11 +01:00
parent 016290ed64
commit a27e317245
19 changed files with 83 additions and 64 deletions

View File

@@ -25,7 +25,6 @@ namespace Thelia\Condition;
use Thelia\Condition\Implementation\ConditionInterface; use Thelia\Condition\Implementation\ConditionInterface;
/** /**
* Validate Conditions * Validate Conditions
* *

View File

@@ -27,7 +27,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
use Thelia\Condition\Implementation\ConditionInterface; use Thelia\Condition\Implementation\ConditionInterface;
use Thelia\Coupon\FacadeInterface; use Thelia\Coupon\FacadeInterface;
/** /**
* Manage how Condition could interact with the current application state (Thelia) * Manage how Condition could interact with the current application state (Thelia)
* *

View File

@@ -23,7 +23,6 @@
namespace Thelia\Condition\Implementation; namespace Thelia\Condition\Implementation;
use Thelia\Condition\ConditionEvaluator; use Thelia\Condition\ConditionEvaluator;
use Thelia\Condition\Operators; use Thelia\Condition\Operators;
use Thelia\Condition\SerializableCondition; use Thelia\Condition\SerializableCondition;

View File

@@ -25,7 +25,6 @@ namespace Thelia\Condition\Implementation;
use InvalidArgumentException; use InvalidArgumentException;
/** /**
* Allow every one, perform no check * Allow every one, perform no check
* *

View File

@@ -23,7 +23,6 @@
namespace Thelia\Condition\Implementation; namespace Thelia\Condition\Implementation;
use Thelia\Condition\Operators; use Thelia\Condition\Operators;
use Thelia\Exception\InvalidConditionOperatorException; use Thelia\Exception\InvalidConditionOperatorException;
use Thelia\Model\Currency; use Thelia\Model\Currency;

View File

@@ -267,7 +267,8 @@ class BaseAdminController extends BaseController
* Redirect to à route ID related URL * Redirect to à route ID related URL
* *
* @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml * @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 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()) public function redirectToRoute($routeId, array $urlParameters = array(), array $routeParameters = array())
{ {

View File

@@ -259,6 +259,8 @@ abstract class BaseController extends ContainerAware
* redirect request to the specified url * redirect request to the specified url
* *
* @param string $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()) public function redirect($url, $status = 302, $cookies = array())
{ {

View File

@@ -49,7 +49,8 @@ class BaseFrontController extends BaseController
* Redirect to à route ID related URL * Redirect to à route ID related URL
* *
* @param unknown $routeId the route ID, as found in Config/Resources/routing/admin.xml * @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 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) public function redirectToRoute($routeId, $urlParameters = array(), $referenceType = Router::ABSOLUTE_PATH)
{ {

View File

@@ -85,7 +85,6 @@ class NewsletterEvent extends ActionEvent
return $this->newsletter; return $this->newsletter;
} }
/** /**
* @param string $email * @param string $email
* *

View File

@@ -37,7 +37,11 @@ class OrderManualEvent extends OrderEvent
protected $customer = null; 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) public function __construct(Order $order, Currency $currency, Lang $lang, Cart $cart, Customer $customer)
{ {

View File

@@ -61,7 +61,7 @@ class ShippingZoneAddAreaEvent extends ActionEvent
} }
/** /**
* @param mixed $shopping_zone_id * @param mixed $shipping_zone_id
* *
* @return $this * @return $this
*/ */

View File

@@ -51,13 +51,13 @@ class ViewListener implements EventSubscriberInterface
{ {
/** /**
* *
* @var Symfony\Component\DependencyInjection\ContainerInterface * @var \Symfony\Component\DependencyInjection\ContainerInterface
*/ */
private $container; private $container;
/** /**
* *
* @param \Thelia\Core\Template\ParserInterface $parser * @param \Symfony\Component\DependencyInjection\ContainerInterfac $container
*/ */
public function __construct(ContainerInterface $container) public function __construct(ContainerInterface $container)
{ {

View File

@@ -17,6 +17,7 @@ class AdminLog extends BaseAdminLog
* @param $message * @param $message
* @param Request $request * @param Request $request
* @param Base\Admin $adminUser * @param Base\Admin $adminUser
* @param bool $withRequestContent
*/ */
public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null, $withRequestContent = true) public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null, $withRequestContent = true)
{ {

View File

@@ -50,7 +50,10 @@ class Customer extends BaseCustomer implements UserInterface
* @param int $reseller * @param int $reseller
* @param null $sponsor * @param null $sponsor
* @param int $discount * @param int $discount
* @throws \Exception|\Symfony\Component\Config\Definition\Exception\Exception * @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) 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)
{ {

View File

@@ -45,7 +45,6 @@ class Order extends BaseOrder
return uniqid('ORD', true); return uniqid('ORD', true);
} }
/** /**
* Compute this order amount. * Compute this order amount.
* *
@@ -98,7 +97,8 @@ class Order extends BaseOrder
/** /**
* Set the status of the current order to NOT PAID * Set the status of the current order to NOT PAID
*/ */
public function setNotPaid() { public function setNotPaid()
{
$this->setStatusHelper(OrderStatus::CODE_NOT_PAID); $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. * @return bool true if this order is NOT PAID, false otherwise.
*/ */
public function isNotPaid() { public function isNotPaid()
{
return $this->hasStatusHelper(OrderStatus::CODE_NOT_PAID); return $this->hasStatusHelper(OrderStatus::CODE_NOT_PAID);
} }
/** /**
* Set the status of the current order to PAID * Set the status of the current order to PAID
*/ */
public function setPaid() { public function setPaid()
{
$this->setStatusHelper(OrderStatus::CODE_PAID); $this->setStatusHelper(OrderStatus::CODE_PAID);
} }
@@ -123,14 +125,16 @@ class Order extends BaseOrder
* *
* @return bool true if this order is PAID, false otherwise. * @return bool true if this order is PAID, false otherwise.
*/ */
public function isPaid() { public function isPaid()
{
return $this->hasStatusHelper(OrderStatus::CODE_PAID); return $this->hasStatusHelper(OrderStatus::CODE_PAID);
} }
/** /**
* Set the status of the current order to PROCESSING * Set the status of the current order to PROCESSING
*/ */
public function setProcessing() { public function setProcessing()
{
$this->setStatusHelper(OrderStatus::CODE_PROCESSING); $this->setStatusHelper(OrderStatus::CODE_PROCESSING);
} }
@@ -139,14 +143,16 @@ class Order extends BaseOrder
* *
* @return bool true if this order is PROCESSING, false otherwise. * @return bool true if this order is PROCESSING, false otherwise.
*/ */
public function isProcessing() { public function isProcessing()
{
return $this->hasStatusHelper(OrderStatus::CODE_PROCESSING); return $this->hasStatusHelper(OrderStatus::CODE_PROCESSING);
} }
/** /**
* Set the status of the current order to SENT * Set the status of the current order to SENT
*/ */
public function setSent() { public function setSent()
{
$this->setStatusHelper(OrderStatus::CODE_SENT); $this->setStatusHelper(OrderStatus::CODE_SENT);
} }
@@ -155,14 +161,16 @@ class Order extends BaseOrder
* *
* @return bool true if this order is SENT, false otherwise. * @return bool true if this order is SENT, false otherwise.
*/ */
public function isSent() { public function isSent()
{
return $this->hasStatusHelper(OrderStatus::CODE_SENT); return $this->hasStatusHelper(OrderStatus::CODE_SENT);
} }
/** /**
* Set the status of the current order to CANCELED * Set the status of the current order to CANCELED
*/ */
public function setCancelled() { public function setCancelled()
{
$this->setStatusHelper(OrderStatus::CODE_CANCELED); $this->setStatusHelper(OrderStatus::CODE_CANCELED);
} }
@@ -171,7 +179,8 @@ class Order extends BaseOrder
* *
* @return bool true if this order is CANCELED, false otherwise. * @return bool true if this order is CANCELED, false otherwise.
*/ */
public function isCancelled() { public function isCancelled()
{
return $this->hasStatusHelper(OrderStatus::CODE_CANCELED); 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. * @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)) { if (null !== $ordeStatus = OrderStatusQuery::create()->findOneByCode($statusCode)) {
$this->setOrderStatus($ordeStatus)->save(); $this->setOrderStatus($ordeStatus)->save();
} }
@@ -192,7 +202,8 @@ class Order extends BaseOrder
* @param string $statusCode the status code, one of OrderStatus::CODE_xxx constants. * @param string $statusCode the status code, one of OrderStatus::CODE_xxx constants.
* @return bool true if this order have the provided status, false otherwise. * @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; return $this->getOrderStatus()->getCode() == $statusCode;
} }

View File

@@ -12,6 +12,7 @@ class TaxRule extends BaseTaxRule
use ModelEventDispatcherTrait; use ModelEventDispatcherTrait;
/** /**
* @param Product $product
* @param Country $country * @param Country $country
* @param $untaxedAmount * @param $untaxedAmount
* @param $untaxedPromoAmount * @param $untaxedPromoAmount

View File

@@ -23,6 +23,7 @@ class ModelCriteriaTools
* @param array $columns * @param array $columns
* @param null $foreignTable * @param null $foreignTable
* @param string $foreignKey * @param string $foreignKey
* @param bool $forceReturn
*/ */
public static function getFrontEndI18n(ModelCriteria &$search, $requestedLocale, $columns, $foreignTable, $foreignKey, $forceReturn = false) public static function getFrontEndI18n(ModelCriteria &$search, $requestedLocale, $columns, $foreignTable, $foreignKey, $forceReturn = false)
{ {