update phpDoc and fix cs
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user