This commit is contained in:
Manuel Raynaud
2013-10-25 10:07:21 +02:00
parent 22caf28f80
commit 2c030f910b
91 changed files with 219 additions and 761 deletions

View File

@@ -23,11 +23,9 @@
namespace Thelia\Action;
use Propel\Runtime\ActiveQuery\Criteria;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Administrator\AdministratorEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Security\AccessManager;
use Thelia\Model\Admin as AdminModel;
use Thelia\Model\AdminQuery;

View File

@@ -34,7 +34,6 @@ use Thelia\Model\ConfigQuery;
use Thelia\Model\LangQuery;
use Thelia\Model\Lang as LangModel;
/**
* Class Lang
* @package Thelia\Action

View File

@@ -29,7 +29,6 @@ use Thelia\Action\BaseAction;
use Thelia\Model\NewsletterQuery;
use Thelia\Model\Newsletter as NewsletterModel;
/**
* Class Newsletter
* @package Thelia\Action

View File

@@ -52,14 +52,6 @@ use Thelia\Core\Event\Product\ProductSetTemplateEvent;
use Thelia\Model\ProductSaleElementsQuery;
use Thelia\Core\Event\Product\ProductDeleteCategoryEvent;
use Thelia\Core\Event\Product\ProductAddCategoryEvent;
use Thelia\Model\AttributeAvQuery;
use Thelia\Model\AttributeCombination;
use Thelia\Core\Event\Product\ProductSaleElementCreateEvent;
use Propel\Runtime\Propel;
use Thelia\Model\Map\ProductTableMap;
use Thelia\Core\Event\Product\ProductSaleElementDeleteEvent;
use Thelia\Model\ProductPrice;
use Thelia\Model\ProductSaleElements;
use Thelia\Core\Event\Product\ProductAddAccessoryEvent;
use Thelia\Core\Event\Product\ProductDeleteAccessoryEvent;

View File

@@ -25,9 +25,6 @@ namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Model\ProductQuery;
use Thelia\Model\Product as ProductModel;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\ProductSaleElement\ProductSaleElementCreateEvent;
use Thelia\Model\Map\ProductSaleElementsTableMap;
@@ -69,8 +66,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
if ($salesElement == null) {
// Create a new default product sale element
$salesElement = $event->getProduct()->createDefaultProductSaleElement($con, 0, 0, $event->getCurrencyId(), true);
}
else {
} else {
// This (new) one is the default
$salesElement->setIsDefault(true)->save($con);
}
@@ -98,8 +94,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
// Store all the stuff !
$con->commit();
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
$con->rollback();
@@ -170,8 +165,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
->setPromoPrice($event->getSalePrice())
->setPrice($event->getPrice())
;
}
else {
} else {
// Do not store the price.
$productPrice
->setPromoPrice(0)
@@ -183,8 +177,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
// Store all the stuff !
$con->commit();
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
$con->rollback();
@@ -214,8 +207,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
if ($product->countSaleElements() <= 0) {
// If we just deleted the last PSE, create a default one
$product->createDefaultProductSaleElement($con, 0, 0, $event->getCurrencyId(), true);
}
else if ($pse->getIsDefault()) {
} elseif ($pse->getIsDefault()) {
// If we deleted the default PSE, make the last created one the default
$pse = ProductSaleElementsQuery::create()
@@ -229,8 +221,7 @@ class ProductSaleElement extends BaseAction implements EventSubscriberInterface
// Store all the stuff !
$con->commit();
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
$con->rollback();

View File

@@ -23,7 +23,6 @@
namespace Thelia\Action;
use Propel\Runtime\ActiveQuery\Criteria;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Profile\ProfileEvent;
use Thelia\Core\Event\TheliaEvents;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Action;
use Propel\Runtime\ActiveQuery\Criteria;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Tax\TaxEvent;
use Thelia\Core\Event\TheliaEvents;

View File

@@ -27,7 +27,6 @@ use Propel\Runtime\ActiveQuery\Criteria;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Tax\TaxRuleEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Model\Map\TaxRuleTableMap;
use Thelia\Model\TaxRuleCountry;
use Thelia\Model\TaxRuleCountryQuery;
use Thelia\Model\TaxRule as TaxRuleModel;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Controller\Admin;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Core\Event\Administrator\AdministratorEvent;
use Thelia\Core\Event\TheliaEvents;
@@ -31,7 +30,6 @@ use Thelia\Form\AdministratorCreationForm;
use Thelia\Form\AdministratorModificationForm;
use Thelia\Model\AdminQuery;
class AdministratorController extends AbstractCrudController
{
public function __construct()
@@ -158,7 +156,6 @@ class AdministratorController extends AbstractCrudController
return $object->getId();
}
protected function renderListTemplate($currentOrder)
{
// We always return to the feature edition form

View File

@@ -25,7 +25,6 @@ namespace Thelia\Controller\Admin;
use Propel\Runtime\Exception\PropelException;
use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Core\Event\Customer\CustomerAddressEvent;
use Thelia\Core\Event\Customer\CustomerCreateOrUpdateEvent;
use Thelia\Core\Event\Customer\CustomerEvent;
use Thelia\Core\Event\TheliaEvents;

View File

@@ -41,7 +41,6 @@ use Thelia\Form\Lang\LangUrlForm;
use Thelia\Model\ConfigQuery;
use Thelia\Model\LangQuery;
/**
* Class LangController
* @package Thelia\Controller\Admin
@@ -53,7 +52,6 @@ class LangController extends BaseAdminController
public function defaultAction()
{
if (null !== $response = $this->checkAuth(AdminResources::LANGUAGE, AccessManager::VIEW)) return $response;
return $this->renderDefault();
}

View File

@@ -47,7 +47,6 @@ class MessageController extends AbstractCrudController
AdminResources::MESSAGE,
TheliaEvents::MESSAGE_CREATE,
TheliaEvents::MESSAGE_UPDATE,
TheliaEvents::MESSAGE_DELETE,

View File

@@ -54,7 +54,6 @@ use Thelia\Core\Event\ProductSaleElement\ProductSaleElementCreateEvent;
use Thelia\Model\AttributeQuery;
use Thelia\Model\AttributeAvQuery;
use Thelia\Form\ProductSaleElementUpdateForm;
use Thelia\Model\ProductSaleElements;
use Thelia\Model\ProductPriceQuery;
use Thelia\Form\ProductDefaultSaleElementUpdateForm;
use Thelia\Model\ProductPrice;
@@ -62,8 +61,6 @@ use Thelia\Model\Currency;
use Symfony\Component\HttpFoundation\JsonResponse;
use Thelia\TaxEngine\Calculator;
use Thelia\Model\Country;
use Thelia\Model\CountryQuery;
use Thelia\Model\TaxRuleQuery;
use Thelia\Tools\NumberFormat;
use Thelia\Model\Product;
use Thelia\Model\CurrencyQuery;
@@ -189,8 +186,8 @@ class ProductController extends AbstractCrudController
return $event->hasProduct();
}
protected function updatePriceFromDefaultCurrency($productPrice, $saleElement, $defaultCurrency, $currentCurrency) {
protected function updatePriceFromDefaultCurrency($productPrice, $saleElement, $defaultCurrency, $currentCurrency)
{
// Get price for default currency
$priceForDefaultCurrency = ProductPriceQuery::create()
->filterByCurrency($defaultCurrency)
@@ -206,7 +203,8 @@ class ProductController extends AbstractCrudController
}
}
protected function appendValue(&$array, $key, $value) {
protected function appendValue(&$array, $key, $value)
{
if (! isset($array[$key])) $array[$key] = array();
$array[$key][] = $value;
@@ -277,8 +275,7 @@ class ProductController extends AbstractCrudController
"isdefault" => $saleElement->getIsDefault() > 0 ? 1 : 0,
"ean_code" => $saleElement->getEanCode()
);
}
else {
} else {
if ($saleElement->getIsDefault()) {
$combinationPseData['default_pse'] = $saleElement->getId();
@@ -871,8 +868,7 @@ class ProductController extends AbstractCrudController
try {
$this->dispatch(TheliaEvents::PRODUCT_ADD_PRODUCT_SALE_ELEMENT, $event);
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
// Any error
return $this->errorPage($ex);
}
@@ -895,8 +891,7 @@ class ProductController extends AbstractCrudController
try {
$this->dispatch(TheliaEvents::PRODUCT_DELETE_PRODUCT_SALE_ELEMENT, $event);
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
// Any error
return $this->errorPage($ex);
}
@@ -983,8 +978,7 @@ class ProductController extends AbstractCrudController
$this->processSingleProductSaleElementUpdate($tmp_data);
}
}
else {
} else {
// No need to preprocess data
$this->processSingleProductSaleElementUpdate($data);
}
@@ -996,12 +990,10 @@ class ProductController extends AbstractCrudController
// Redirect to the success URL
$this->redirect($changeForm->getSuccessUrl());
}
catch (FormValidationException $ex) {
} catch (FormValidationException $ex) {
// Form cannot be validated
$error_msg = $this->createStandardFormValidationErrorMessage($ex);
}
catch (\Exception $ex) {
} catch (\Exception $ex) {
// Any other error
$error_msg = $ex->getMessage();
}
@@ -1016,7 +1008,8 @@ class ProductController extends AbstractCrudController
/**
* Process the change of product's PSE list.
*/
public function updateProductSaleElementsAction() {
public function updateProductSaleElementsAction()
{
return $this->processProductSaleElementUpdate(
new ProductSaleElementUpdateForm($this->getRequest())
);
@@ -1025,7 +1018,8 @@ class ProductController extends AbstractCrudController
/**
* Update default product sale element (not attached to any combination)
*/
public function updateProductDefaultSaleElementAction() {
public function updateProductDefaultSaleElementAction()
{
return $this->processProductSaleElementUpdate(
new ProductDefaultSaleElementUpdateForm($this->getRequest())
);
@@ -1035,8 +1029,8 @@ class ProductController extends AbstractCrudController
* Invoked through Ajax; this method calculates the taxed price from the unaxed price, and
* vice versa.
*/
public function priceCaclulator() {
public function priceCaclulator()
{
$return_price = 0;
$price = floatval($this->getRequest()->get('price', 0));
@@ -1048,11 +1042,9 @@ class ProductController extends AbstractCrudController
if ($action == 'to_tax') {
$return_price = $this->computePrice($price, 'without_tax', $product);
}
else if ($action == 'from_tax') {
} elseif ($action == 'from_tax') {
$return_price = $this->computePrice($price, 'with_tax', $product);
}
else {
} else {
$return_price = $price;
}
@@ -1069,8 +1061,8 @@ class ProductController extends AbstractCrudController
*
* @return \Symfony\Component\HttpFoundation\JsonResponse
*/
public function loadConvertedPrices() {
public function loadConvertedPrices()
{
$product_sale_element_id = intval($this->getRequest()->get('product_sale_element_id', 0));
$currency_id = intval($this->getRequest()->get('currency_id', 0));
@@ -1119,8 +1111,8 @@ class ProductController extends AbstractCrudController
* @param Product $product
* @return Ambigous <unknown, number>
*/
protected function computePrice($price, $price_type, Product $product, $convert = false) {
protected function computePrice($price, $price_type, Product $product, $convert = false)
{
$calc = new Calculator();
$calc->load(
@@ -1130,11 +1122,9 @@ class ProductController extends AbstractCrudController
if ($price_type == 'without_tax') {
$return_price = $calc->getTaxedPrice($price);
}
else if ($price_type == 'with_tax') {
} elseif ($price_type == 'with_tax') {
$return_price = $calc->getUntaxedPrice($price);
}
else {
} else {
$return_price = $price;
}

View File

@@ -29,7 +29,6 @@ use Thelia\Core\Event\Profile\ProfileEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\ProfileCreationForm;
use Thelia\Form\ProfileModificationForm;
use Thelia\Form\ProfileProfileListUpdateForm;
use Thelia\Form\ProfileUpdateModuleAccessForm;
use Thelia\Form\ProfileUpdateResourceAccessForm;
use Thelia\Model\ProfileQuery;

View File

@@ -28,7 +28,6 @@ use Thelia\Core\Event\Tax\TaxEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\TaxCreationForm;
use Thelia\Form\TaxModificationForm;
use Thelia\Form\TaxTaxListUpdateForm;
use Thelia\Model\TaxQuery;
class TaxController extends AbstractCrudController
@@ -200,7 +199,6 @@ class TaxController extends AbstractCrudController
{
$type = $formData['type'];
}
protected function getRequirements($type, $formData)

View File

@@ -196,15 +196,13 @@ class BaseController extends ContainerAware
$errorMessage = null;
if ($form->get("error_message")->getData() != null) {
$errorMessage = $form->get("error_message")->getData();
}
else {
} else {
$errorMessage = sprintf("Missing or invalid data: %s", $this->getErrorMessages($form));
}
throw new FormValidationException($errorMessage);
}
}
else {
} else {
throw new FormValidationException(sprintf("Wrong form method, %s expected.", $expectedMethod));
}
}
@@ -229,8 +227,7 @@ class BaseController extends ContainerAware
{
if ($form != null) {
$url = $form->getSuccessUrl();
}
else {
} else {
$url = $this->getRequest()->get("success_url");
}

View File

@@ -67,7 +67,6 @@ class CartController extends BaseFrontController
$request->attributes->set('_view', "includes/mini-cart");
}
if ($message) {
$cartAdd->setErrorMessage($message);
$this->getParserContext()->addForm($cartAdd);

View File

@@ -26,7 +26,6 @@ use Thelia\Form\ContactForm;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Model\ConfigQuery;
/**
* Class ContactController
* @package Thelia\Controller\Front

View File

@@ -24,21 +24,11 @@ namespace Thelia\Controller\Front;
use Propel\Runtime\Exception\PropelException;
use Thelia\Core\Event\Coupon\CouponConsumeEvent;
use Thelia\Exception\TheliaProcessException;
use Thelia\Form\CouponCode;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Core\Event\Order\OrderEvent;
use Thelia\Core\Event\TheliaEvents;
use Symfony\Component\HttpFoundation\Request;
use Thelia\Form\OrderDelivery;
use Thelia\Form\OrderPayment;
use Thelia\Log\Tlog;
use Thelia\Model\AddressQuery;
use Thelia\Model\AreaDeliveryModuleQuery;
use Thelia\Model\Base\OrderQuery;
use Thelia\Model\ModuleQuery;
use Thelia\Model\Order;
use Thelia\Tools\URL;
/**
* Class CouponController

View File

@@ -51,7 +51,6 @@ class CustomerController extends BaseFrontController
{
use \Thelia\Cart\CartTrait;
public function newPasswordAction()
{
if (! $this->getSecurityContext()->hasCustomerUser()) {
@@ -156,7 +155,6 @@ class CustomerController extends BaseFrontController
$this->getParserContext()->addForm($customerProfilUpdateForm);
}
public function updatePasswordAction()
{
if ($this->getSecurityContext()->hasCustomerUser()) {

View File

@@ -23,7 +23,6 @@
namespace Thelia\Controller\Front;
/**
* Class Mail
* @package Thelia\Controller\Front

View File

@@ -27,7 +27,6 @@ use Thelia\Core\Event\Newsletter\NewsletterEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Form\NewsletterForm;
/**
* Class NewsletterController
* @package Thelia\Controller\Front
@@ -50,8 +49,7 @@ class NewsletterController extends BaseFrontController
$this->getRequest()->getSession()->getLang()->getLocale()
);
if (null !== $customer = $this->getSecurityContext()->getCustomerUser())
{
if (null !== $customer = $this->getSecurityContext()->getCustomerUser()) {
$event->setFirstname($customer->getFirstname());
$event->setLastname($customer->getLastname());
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Lang;
/**
* Class LangCreateEvent
* @package Thelia\Core\Event\Lang
@@ -137,5 +136,4 @@ class LangCreateEvent extends LangEvent
return $this->title;
}
}

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\Lang;
use Thelia\Core\Event\ActionEvent;
/**
* Class LangDefaultBehaviorEvent
* @package Thelia\Core\Event\Lang
@@ -37,7 +36,7 @@ class LangDefaultBehaviorEvent extends ActionEvent
*/
protected $defaultBehavior;
function __construct($defaultBehavior)
public function __construct($defaultBehavior)
{
$this->defaultBehavior = $defaultBehavior;
}
@@ -58,7 +57,4 @@ class LangDefaultBehaviorEvent extends ActionEvent
return $this->defaultBehavior;
}
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Lang;
/**
* Class LangDeleteEvent
* @package Thelia\Core\Event\Lang
@@ -39,7 +38,7 @@ class LangDeleteEvent extends LangEvent
/**
* @param int $lang_id
*/
function __construct($lang_id)
public function __construct($lang_id)
{
$this->lang_id = $lang_id;
}

View File

@@ -25,7 +25,6 @@ namespace Thelia\Core\Event\Lang;
use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Lang;
/**
* Class LangEvent
* @package Thelia\Core\Event\Lang
@@ -38,7 +37,7 @@ class LangEvent extends ActionEvent
*/
protected $lang;
function __construct(Lang $lang = null)
public function __construct(Lang $lang = null)
{
$this->lang = $lang;
}
@@ -70,7 +69,4 @@ class LangEvent extends ActionEvent
return null !== $this->lang;
}
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Lang;
/**
* Class LangToggleDefaultEvent
* @package Thelia\Core\Event\Lang
@@ -39,7 +38,7 @@ class LangToggleDefaultEvent extends LangEvent
/**
* @param int $lang_id
*/
function __construct($lang_id)
public function __construct($lang_id)
{
$this->lang_id = $lang_id;
}
@@ -64,6 +63,4 @@ class LangToggleDefaultEvent extends LangEvent
return $this->lang_id;
}
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Lang;
/**
* Class LangUpdateEvent
* @package Thelia\Core\Event\Lang
@@ -39,12 +38,11 @@ class LangUpdateEvent extends LangCreateEvent
/**
* @param int $id
*/
function __construct($id)
public function __construct($id)
{
$this->id = $id;
}
/**
* @param int $id
*
@@ -65,5 +63,4 @@ class LangUpdateEvent extends LangCreateEvent
return $this->id;
}
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Module;
/**
* Class ModuleDeleteEvent
* @package Thelia\Core\Event\Module
@@ -36,7 +35,7 @@ class ModuleDeleteEvent extends ModuleEvent
*/
protected $module_id;
function __construct($module_id)
public function __construct($module_id)
{
$this->module_id = $module_id;
}
@@ -57,5 +56,4 @@ class ModuleDeleteEvent extends ModuleEvent
return $this->module_id;
}
}

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\Newsletter;
use Thelia\Core\Event\ActionEvent;
/**
* Class NewsletterEvent
* @package Thelia\Core\Event\Newsletter
@@ -57,7 +56,7 @@ class NewsletterEvent extends ActionEvent
*/
protected $locale;
function __construct($email, $locale)
public function __construct($email, $locale)
{
$this->email = $email;
$this->locale = $locale;
@@ -159,8 +158,4 @@ class NewsletterEvent extends ActionEvent
return $this->id;
}
}

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Event\ProductSaleElement;
use Thelia\Model\Product;
use Thelia\Core\Event\Product\ProductEvent;
class ProductSaleElementCreateEvent extends ProductSaleElementEvent
{
@@ -65,15 +64,16 @@ class ProductSaleElementCreateEvent extends ProductSaleElementEvent
return $this;
}
public function getProduct() {
public function getProduct()
{
return $this->product;
}
public function setProduct($product) {
public function setProduct($product)
{
$this->product = $product;
return $this;
}
}

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\ProductSaleElement;
use Thelia\Model\Product;
use Thelia\Core\Event\Product\ProductEvent;
class ProductSaleElementDeleteEvent extends ProductSaleElementEvent
{
@@ -58,6 +57,7 @@ class ProductSaleElementDeleteEvent extends ProductSaleElementEvent
public function setCurrencyId($currency_id)
{
$this->currency_id = $currency_id;
return $this;
}

View File

@@ -22,9 +22,7 @@
/*************************************************************************************/
namespace Thelia\Core\Event\ProductSaleElement;
use Thelia\Core\Event\Product\ProductCreateEvent;
use Thelia\Model\Product;
use Thelia\Core\Event\Product\ProductEvent;
class ProductSaleElementUpdateEvent extends ProductSaleElementEvent
{
@@ -217,6 +215,7 @@ class ProductSaleElementUpdateEvent extends ProductSaleElementEvent
public function setFromDefaultCurrency($from_default_currency)
{
$this->from_default_currency = $from_default_currency;
return $this;
}

View File

@@ -552,7 +552,6 @@ final class TheliaEvents
const TAX_UPDATE = "action.updateTax";
const TAX_DELETE = "action.deleteTax";
// -- Profile management ---------------------------------------------
const PROFILE_CREATE = "action.createProfile";

View File

@@ -23,13 +23,6 @@
namespace Thelia\Core\Security;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Core\Security\User\UserInterface;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Model\ProfileQuery;
use Thelia\Model\ProfileResourceQuery;
/**
* A simple security manager, in charge of checking user
*
@@ -49,7 +42,7 @@ class AccessManager
self::DELETE => false,
);
static protected $accessPows = array(
protected static $accessPows = array(
self::VIEW => 3,
self::CREATE => 2,
self::UPDATE => 1,
@@ -75,7 +68,7 @@ class AccessManager
}
static public function getMaxAccessValue()
public static function getMaxAccessValue()
{
return pow(2, current(array_slice( self::$accessPows, -1, 1, true ))) - 1;
}
@@ -106,7 +99,6 @@ class AccessManager
}
}
public function getAccessValue()
{
return $this->accessValue;

View File

@@ -23,7 +23,7 @@
namespace Thelia\Core\Security\Exception;
class ResourceException extends \RuntimeException
class RessourceException extends \RuntimeException
{
const UNKNOWN_EXCEPTION = 0;

View File

@@ -33,9 +33,9 @@ use Thelia\Core\Security\Exception\ResourceException;
*/
final class AdminResources
{
static private $selfReflection = null;
private static $selfReflection = null;
static public function retrieve($name)
public static function retrieve($name)
{
$constantName = strtoupper($name);

View File

@@ -23,12 +23,9 @@
namespace Thelia\Core\Security;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Core\Security\User\UserInterface;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Model\ProfileQuery;
use Thelia\Model\ProfileResourceQuery;
/**
* A simple security manager, in charge of checking user

View File

@@ -27,7 +27,6 @@ use Propel\Runtime\ActiveQuery\Criteria;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Thelia\Core\Template\Element\Exception\SearchLoopException;
use Thelia\Core\Template\Loop\Argument\Argument;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Thelia\Core\Security\SecurityContext;

View File

@@ -22,8 +22,6 @@
/*************************************************************************************/
namespace Thelia\Core\Template\Element;
use Symfony\Component\Validator\ExecutionContextInterface;
/**
*
* @author Etienne Roudeix <eroudeix@openstudio.fr>

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
@@ -34,7 +33,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\AdminQuery;
use Thelia\Type;
use Thelia\Type\BooleanOrBothType;
/**
*

View File

@@ -16,7 +16,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Model\CountryQuery;
use Thelia\Type;
use Thelia\Type\TypeCollection;
class Cart extends BaseLoop
{

View File

@@ -33,7 +33,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\FolderQuery;
use Thelia\Model\Map\ContentTableMap;
use Thelia\Model\ContentFolderQuery;
use Thelia\Model\ContentQuery;
use Thelia\Type\TypeCollection;
use Thelia\Type;

View File

@@ -32,7 +32,6 @@ use Thelia\Core\Template\Element\SearchLoopInterface;
use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\CustomerQuery;
use Thelia\Model\OrderAddress;
use Thelia\Model\OrderAddressQuery;
use Thelia\Model\OrderQuery;
use Thelia\Type\TypeCollection;

View File

@@ -26,7 +26,6 @@ namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\Join;
use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\BaseLoop;
use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow;
@@ -35,7 +34,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Exception\TaxEngineException;
use Thelia\Model\Base\ProductSaleElementsQuery;
use Thelia\Model\CategoryQuery;
use Thelia\Model\CountryQuery;
use Thelia\Model\CurrencyQuery;

View File

@@ -33,7 +33,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\ProfileQuery;
use Thelia\Type;
use Thelia\Type\BooleanOrBothType;
/**
*

View File

@@ -34,7 +34,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\ResourceQuery;
use Thelia\Type;
use Thelia\Type\BooleanOrBothType;
/**
*

View File

@@ -178,8 +178,6 @@ class TaxRuleCountry extends BaseI18nLoop
;
}
$loopResult->addRow($loopResultRow);
}

View File

@@ -24,7 +24,6 @@
namespace Thelia\Core\Template;
use Thelia\Core\Thelia;
use Thelia\Model\ConfigQuery;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Form\BaseForm;
/**

View File

@@ -60,8 +60,8 @@ use Symfony\Component\Form\Extension\Core\View\ChoiceView;
*/
class Form extends AbstractSmartyPlugin
{
static private $taggedFieldsStack = null;
static private $taggedFieldsStackPosition = null;
private static $taggedFieldsStack = null;
private static $taggedFieldsStackPosition = null;
protected $request;
protected $parserContext;
@@ -113,8 +113,7 @@ class Form extends AbstractSmartyPlugin
$template->assign("form_error", $instance->hasError() ? true : false);
$template->assign("form_error_message", $instance->getErrorMessage());
}
else {
} else {
return $content;
}
}
@@ -127,7 +126,6 @@ class Form extends AbstractSmartyPlugin
$template->assign("checked", isset($fieldVars['checked']) ? $fieldVars['checked'] : false);
//data
$template->assign("data", $fieldVars['data']);
@@ -182,7 +180,6 @@ class Form extends AbstractSmartyPlugin
if ($formFieldType instanceof TheliaType) {
$template->assign("formType", $formFieldView->vars['type']);
switch ($formFieldView->vars['type']) {
case "choice":
if (!isset($formFieldView->vars['options']['choices']) || !is_array($formFieldView->vars['options']['choices'])) {
@@ -223,18 +220,15 @@ class Form extends AbstractSmartyPlugin
$val = $value[$key];
$this->assignFieldValues($template, $name, $val, $formFieldView->vars, $value_count);
}
else {
} else {
throw new \InvalidArgumentException(sprintf("Missing or empty parameter 'value_key' for field '%s'", $formFieldView->vars["name"]));
}
}
else {
} else {
$this->assignFieldValues($template, $formFieldView->vars["full_name"], $formFieldView->vars["value"], $formFieldView->vars);
}
$formFieldView->setRendered();
}
else {
} else {
return $content;
}
}
@@ -322,8 +316,7 @@ class Form extends AbstractSmartyPlugin
if ($repeat) {
$this->assignFieldErrorVars($template, $errors);
}
else {
} else {
return $content;
}
}

View File

@@ -8,7 +8,6 @@ use \Symfony\Component\EventDispatcher\EventDispatcherInterface;
use \Smarty;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Thelia\Core\Template\ParserInterface;
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;

View File

@@ -25,12 +25,9 @@ namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Core\Translation\Translator;
use Thelia\Model\AdminQuery;
use Thelia\Model\ProfileQuery;
use Thelia\Model\ConfigQuery;
class AdministratorCreationForm extends BaseForm
{

View File

@@ -25,7 +25,6 @@ namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Translation\Translator;
use Thelia\Model\AdminQuery;
class AdministratorModificationForm extends AdministratorCreationForm

View File

@@ -27,7 +27,6 @@ use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Core\Translation\Translator;
/**
* Class ContactForm
* @package Thelia\Form

View File

@@ -23,8 +23,6 @@
namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Thelia\Model\ModuleQuery;
use Thelia\Module\BaseModule;
/**
* Class CouponCode

View File

@@ -27,7 +27,6 @@ use Symfony\Component\Validator\Constraints\Date;
use Symfony\Component\Validator\Constraints\GreaterThanOrEqual;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\NotEqualTo;
use Symfony\Component\Validator\Constraints\Range;
/**
* Created by JetBrains PhpStorm.

View File

@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Model\ConfigQuery;
use Thelia\Core\Translation\Translator;
use Thelia\Model\CustomerQuery;
/**
* Class CustomerPasswordUpdateForm

View File

@@ -22,11 +22,8 @@
/*************************************************************************************/
namespace Thelia\Form;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Model\CustomerQuery;
use Thelia\Model\ConfigQuery;
use Thelia\Core\Translation\Translator;
/**
* Class CustomerProfilUpdateForm
@@ -69,7 +66,6 @@ class CustomerProfilUpdateForm extends CustomerCreateForm
));
}
/**
* @param $value
* @param ExecutionContextInterface $context

View File

@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm;
use Thelia\Core\Translation\Translator;
/**
* Class LangCreateForm
* @package Thelia\Form\Lang

View File

@@ -24,11 +24,9 @@
namespace Thelia\Form\Lang;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range;
use Thelia\Form\BaseForm;
use Thelia\Core\Translation\Translator;
/**
* Class LangDefaultBehaviorForm
* @package Thelia\Form\Lang

View File

@@ -25,7 +25,6 @@ namespace Thelia\Form\Lang;
use Symfony\Component\Validator\Constraints\GreaterThan;
use Symfony\Component\Validator\Constraints\NotBlank;
/**
* Class LangUpdateForm
* @package Thelia\Form\Lang

View File

@@ -24,7 +24,6 @@
namespace Thelia\Form\Lang;
use Thelia\Core\Event\ActionEvent;
/**
* Class LangUrlEvent
* @package Thelia\Form\Lang

View File

@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use Thelia\Form\BaseForm;
use Thelia\Model\LangQuery;
/**
* Class LangUrlForm
* @package Thelia\Form\Lang

View File

@@ -30,7 +30,6 @@ use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Translation\Translator;
use Thelia\Model\NewsletterQuery;
/**
* Class NewsletterForm
* @package Thelia\Form

View File

@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Translation\Translator;
use Thelia\Model\ProfileQuery;
use Thelia\Model\ModuleQuery;

View File

@@ -26,7 +26,6 @@ use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Security\AccessManager;
use Thelia\Core\Translation\Translator;
use Thelia\Model\ProfileQuery;
use Thelia\Model\ResourceQuery;

View File

@@ -148,7 +148,6 @@ abstract class BaseModule extends ContainerAware
);
}
/* browse the directory */
$imagePosition = 1;
foreach ($directoryBrowser as $directoryContent) {

View File

@@ -1,47 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test BaseFacade Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class CouponBaseAdapterTest extends \PHPUnit_Framework_TestCase
{
public function testSomething()
{
// Stop here and mark this test as incomplete.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}

View File

@@ -1,48 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
require_once 'CouponManagerTest.php';
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test CouponFactory Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class CouponFactoryTest extends \PHPUnit_Framework_TestCase
{
public function testSomething()
{
// Stop here and mark this test as incomplete.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}

View File

@@ -1,48 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test CouponManager Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class CouponManagerTest extends \PHPUnit_Framework_TestCase
{
public function testSomething()
{
// Stop here and mark this test as incomplete.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}

View File

@@ -1,46 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test ConditionCollection Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class CouponRuleCollectionTest extends \PHPUnit_Framework_TestCase
{
public function testSomething()
{
// Stop here and mark this test as incomplete.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}

View File

@@ -1,73 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
use Thelia\Coupon\RuleOrganizer;
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test RuleOrganizer Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class RuleOrganizerTest extends \PHPUnit_Framework_TestCase
{
/**
* @var RuleOrganizer
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
$this->object = new RuleOrganizer();
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
/**
* @covers Thelia\Coupon\RuleOrganizer::organize
* @todo Implement testOrganize().
*/
public function testOrganize()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}

View File

@@ -1,65 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
//require_once '../CouponManagerTest.php';
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test RemoveXAmount Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class RemoveXAmountTest extends \PHPUnit_Framework_TestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
}
public function testSomething()
{
// Stop here and mark this test as incomplete.
$this->markTestIncomplete(
'This coupon has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -1,67 +0,0 @@
<?php
/**********************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/**********************************************************************************/
namespace Thelia\Coupon;
use PHPUnit_Framework_TestCase;
//require_once '../CouponManagerTest.php';
/**
* Created by JetBrains PhpStorm.
* Date: 8/19/13
* Time: 3:24 PM
*
* Unit Test RemoveXPercent Class
*
* @package Coupon
* @author Guillaume MOREL <gmorel@openstudio.fr>
*
*/
class RemoveXPercentTest extends \PHPUnit_Framework_TestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
}
public function testSomething()
{
$this->markTestIncomplete(
'This coupon has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -30,7 +30,7 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
/**
* @covers Thelia\Tools\FileManager::copyUploadedFile
*/
public function testCopyUploadedFile()
/* public function testCopyUploadedFile()
{
$this->markTestIncomplete(
'This test has not been implemented yet : Mock issue'
@@ -103,13 +103,13 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
$actual = $fileManager->copyUploadedFile(24, FileManager::TYPE_PRODUCT, $stubProductImage, $stubUploadedFile, $newUploadedFiles, FileManager::FILE_TYPE_IMAGES);
$this->assertCount(1, $actual);
}
}*/
/**
* @covers Thelia\Tools\FileManager::copyUploadedFile
* @expectedException \Thelia\Exception\ImageException
*/
public function testCopyUploadedFileExceptionImageException()
/*public function testCopyUploadedFileExceptionImageException()
{
$this->markTestIncomplete(
'This test has not been implemented yet : Mock issue'
@@ -181,7 +181,7 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
$actual = $fileManager->copyUploadedFile(24, FileManager::TYPE_PRODUCT, $stubProductImage, $stubUploadedFile, $newUploadedFiles, FileManager::FILE_TYPE_DOCUMENTS);
}
}*/
/**
* @covers Thelia\Tools\FileManager::saveImage
@@ -650,23 +650,23 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
/**
* @covers Thelia\Tools\FileManager::getImageForm
*/
public function testGetImageForm()
/* public function testGetImageForm()
{
// Mock issue
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}*/
/**
* @covers Thelia\Tools\FileManager::getDocumentForm
*/
public function testGetDocumentForm()
/* public function testGetDocumentForm()
{
// Mock issue
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}*/
/**
* @covers Thelia\Tools\FileManager::getUploadDir
@@ -879,21 +879,21 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
/**
* @covers Thelia\Tools\FileManager::adminLogAppend
*/
public function testAdminLogAppend()
/* public function testAdminLogAppend()
{
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}*/
/**
* @covers Thelia\Tools\FileManager::deleteFile
*/
public function testDeleteFile()
/* public function testDeleteFile()
{
// @todo see http://tech.vg.no/2011/03/09/mocking-the-file-system-using-phpunit-and-vfsstream/
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
}*/
}

View File

@@ -46,7 +46,6 @@ class NumberFormat
if ($decimals == null) $decimals = $lang->getDecimals();
if ($decPoint == null) $decPoint = $lang->getDecimalSeparator();
if ($thousandsSep == null) $thousandsSep = $lang->getThousandsSeparator();
return number_format($number, $decimals, $decPoint, $thousandsSep);
}
}