diff --git a/src/Elcodi/Admin/CartBundle/Resources/views/Order/edit.html.twig b/src/Elcodi/Admin/CartBundle/Resources/views/Order/edit.html.twig index 58b30a59..6a264658 100644 --- a/src/Elcodi/Admin/CartBundle/Resources/views/Order/edit.html.twig +++ b/src/Elcodi/Admin/CartBundle/Resources/views/Order/edit.html.twig @@ -161,7 +161,7 @@

{{ 'admin.order.field.carrier'|trans }}

{# TODO: Extract carrier_name from the shown order #} - {{ carrier_name|default('Default') }} ( {{ order.shippingAmount|print_money }} ) + {{ order.shippingMethod.carrierName }} ( {{ order.shippingAmount|print_money }} ) diff --git a/src/Elcodi/Admin/PaymentBundle/AdminPaymentBundle.php b/src/Elcodi/Admin/PaymentBundle/AdminPaymentBundle.php index 13176860..33b1793b 100644 --- a/src/Elcodi/Admin/PaymentBundle/AdminPaymentBundle.php +++ b/src/Elcodi/Admin/PaymentBundle/AdminPaymentBundle.php @@ -20,10 +20,10 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Admin\PaymentBundle\DependencyInjection\AdminPaymentExtension; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class AdminPaymentBundle diff --git a/src/Elcodi/Admin/StoreBundle/AdminStoreBundle.php b/src/Elcodi/Admin/StoreBundle/AdminStoreBundle.php index fcb33d1a..d382bb5f 100644 --- a/src/Elcodi/Admin/StoreBundle/AdminStoreBundle.php +++ b/src/Elcodi/Admin/StoreBundle/AdminStoreBundle.php @@ -20,10 +20,10 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Admin\StoreBundle\DependencyInjection\AdminStoreExtension; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class AdminStoreBundle diff --git a/src/Elcodi/Bridge/BehatBridgeBundle/DoctrineContext.php b/src/Elcodi/Bridge/BehatBridgeBundle/DoctrineContext.php index 0f24babe..29ce89d8 100644 --- a/src/Elcodi/Bridge/BehatBridgeBundle/DoctrineContext.php +++ b/src/Elcodi/Bridge/BehatBridgeBundle/DoctrineContext.php @@ -56,7 +56,7 @@ public function prepare(BeforeScenarioScope $scope) ->executeCommand('doctrine:fixtures:load', [ '--fixtures' => $this ->kernel - ->getRootDir() . '/../src/Elcodi/Fixtures', + ->getRootDir() . '/../src/Elcodi', ]) ->laodLocationFixtures() ->executeCommand('elcodi:plugins:load') diff --git a/src/Elcodi/Bridge/PaymentSuiteBridgeBundle/ElcodiPaymentSuiteBridgeBundle.php b/src/Elcodi/Bridge/PaymentSuiteBridgeBundle/ElcodiPaymentSuiteBridgeBundle.php index 2fb3ba99..6bd1e8fe 100644 --- a/src/Elcodi/Bridge/PaymentSuiteBridgeBundle/ElcodiPaymentSuiteBridgeBundle.php +++ b/src/Elcodi/Bridge/PaymentSuiteBridgeBundle/ElcodiPaymentSuiteBridgeBundle.php @@ -20,10 +20,10 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Bridge\PaymentSuiteBridgeBundle\DependencyInjection\ElcodiPaymentSuiteBridgeExtension; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class ElcodiPaymentSuiteBridgeBundle diff --git a/src/Elcodi/Fixtures/DataFixtures/ORM/Store/StoreData.php b/src/Elcodi/Fixtures/DataFixtures/ORM/Store/StoreData.php index 246b40ba..21b9d0a2 100644 --- a/src/Elcodi/Fixtures/DataFixtures/ORM/Store/StoreData.php +++ b/src/Elcodi/Fixtures/DataFixtures/ORM/Store/StoreData.php @@ -44,7 +44,7 @@ public function load(ObjectManager $manager) */ $storeDirector = $this->getDirector('store'); $address = $this->getReference('address-home'); - $language = $this->getReference('language-es'); + $language = $this->getReference('language-en'); $currency = $this->getReference('currency-EUR'); $imagePath = realpath(dirname(__FILE__) . '/images/wallpaper.jpg'); diff --git a/src/Elcodi/Plugin/CustomShippingBundle/ElcodiCustomShippingBundle.php b/src/Elcodi/Plugin/CustomShippingBundle/ElcodiCustomShippingBundle.php index 454b130b..6f9a5c47 100644 --- a/src/Elcodi/Plugin/CustomShippingBundle/ElcodiCustomShippingBundle.php +++ b/src/Elcodi/Plugin/CustomShippingBundle/ElcodiCustomShippingBundle.php @@ -20,12 +20,12 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; use Elcodi\Component\Plugin\Interfaces\PluginInterface; use Elcodi\Plugin\CustomShippingBundle\CompilerPass\MappingCompilerPass; use Elcodi\Plugin\CustomShippingBundle\DependencyInjection\ElcodiCustomShippingExtension; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class ElcodiCustomShippingBundle diff --git a/src/Elcodi/Plugin/CustomShippingBundle/EventListener/ShippingCollectEventListener.php b/src/Elcodi/Plugin/CustomShippingBundle/EventListener/ShippingCollectEventListener.php index 8df38b1b..427cdd31 100644 --- a/src/Elcodi/Plugin/CustomShippingBundle/EventListener/ShippingCollectEventListener.php +++ b/src/Elcodi/Plugin/CustomShippingBundle/EventListener/ShippingCollectEventListener.php @@ -74,8 +74,7 @@ public function __construct( CarrierRepository $carrierRepository, CurrencyConverter $currencyConverter, ZoneMatcher $zoneMatcher - ) - { + ) { $this->plugin = $plugin; $this->carrierRepository = $carrierRepository; $this->currencyConverter = $currencyConverter; @@ -95,7 +94,6 @@ public function addCustomShippingMethods(ShippingCollectionEvent $event) ->plugin ->isEnabled() ) { - return $this; } @@ -157,8 +155,7 @@ private function getAllShippingRangesSatisfiedWithCart(CartInterface $cart) private function getShippingRangesSatisfiedByCart( CartInterface $cart, CarrierInterface $carrier - ) - { + ) { $shippingRanges = $carrier->getRanges(); $validShippingRanges = []; @@ -187,8 +184,7 @@ private function getShippingRangesSatisfiedByCart( private function isShippingRangeSatisfiedByCart( CartInterface $cart, ShippingRangeInterface $shippingRange - ) - { + ) { if ($shippingRange->getType() === ElcodiShippingRangeTypes::TYPE_PRICE) { return $this->isShippingPriceRangeSatisfiedByCart($cart, $shippingRange); } elseif ($shippingRange->getType() === ElcodiShippingRangeTypes::TYPE_WEIGHT) { @@ -209,8 +205,7 @@ private function isShippingRangeSatisfiedByCart( private function isShippingPriceRangeSatisfiedByCart( CartInterface $cart, ShippingRangeInterface $shippingRange - ) - { + ) { $cartPrice = $cart->getProductAmount(); $cartPriceCurrency = $cartPrice->getCurrency(); $shippingRangeFromPrice = $shippingRange->getFromPrice(); @@ -243,8 +238,7 @@ private function isShippingPriceRangeSatisfiedByCart( private function isShippingWeightRangeSatisfiedByCart( CartInterface $cart, ShippingRangeInterface $shippingRange - ) - { + ) { $cartWeight = $cart->getWeight(); $cartRangeFromWeight = $shippingRange->getFromWeight(); $cartRangeToWeight = $shippingRange->getToWeight(); @@ -270,8 +264,7 @@ private function isShippingWeightRangeSatisfiedByCart( private function isShippingRangeZonesSatisfiedByCart( CartInterface $cart, ShippingRangeInterface $shippingRange - ) - { + ) { $deliveryAddress = $cart->getDeliveryAddress(); return diff --git a/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/CarrierTypeTest.php b/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/CarrierTypeTest.php index 5f0d4150..22a30551 100644 --- a/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/CarrierTypeTest.php +++ b/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/CarrierTypeTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Elcodi package. * - * Copyright (c) 2014 Elcodi.com + * Copyright (c) 2014-2015 Elcodi.com * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/ShippingRangeTypeTest.php b/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/ShippingRangeTypeTest.php index e37765be..8ee1e26f 100644 --- a/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/ShippingRangeTypeTest.php +++ b/src/Elcodi/Plugin/CustomShippingBundle/Tests/Functional/Form/Type/ShippingRangeTypeTest.php @@ -3,7 +3,7 @@ /* * This file is part of the Elcodi package. * - * Copyright (c) 2014 Elcodi.com + * Copyright (c) 2014-2015 Elcodi.com * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Elcodi/Plugin/CustomShippingBundle/Tests/UnitTest/EventListener/ShippingCollectEventListenerTest.php b/src/Elcodi/Plugin/CustomShippingBundle/Tests/UnitTest/EventListener/ShippingCollectEventListenerTest.php index d3207771..e62e0448 100644 --- a/src/Elcodi/Plugin/CustomShippingBundle/Tests/UnitTest/EventListener/ShippingCollectEventListenerTest.php +++ b/src/Elcodi/Plugin/CustomShippingBundle/Tests/UnitTest/EventListener/ShippingCollectEventListenerTest.php @@ -18,7 +18,6 @@ namespace Elcodi\Plugin\CustomShippingBundle\Tests\UnitTest\EventListener; use Doctrine\Common\Collections\ArrayCollection; -use Elcodi\Component\Plugin\Entity\Plugin; use PHPUnit_Framework_TestCase; use Prophecy\Argument; @@ -26,6 +25,7 @@ use Elcodi\Component\Currency\Entity\Currency; use Elcodi\Component\Currency\Entity\Money; use Elcodi\Component\Currency\Services\CurrencyConverter; +use Elcodi\Component\Plugin\Entity\Plugin; use Elcodi\Component\Shipping\Entity\ShippingMethod; use Elcodi\Component\Shipping\Event\ShippingCollectionEvent; use Elcodi\Component\Zone\Services\ZoneMatcher; diff --git a/src/Elcodi/Plugin/FreePaymentBundle/ElcodiFreePaymentBundle.php b/src/Elcodi/Plugin/FreePaymentBundle/ElcodiFreePaymentBundle.php index a5406ab3..e441aa65 100644 --- a/src/Elcodi/Plugin/FreePaymentBundle/ElcodiFreePaymentBundle.php +++ b/src/Elcodi/Plugin/FreePaymentBundle/ElcodiFreePaymentBundle.php @@ -20,11 +20,11 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; use Elcodi\Component\Plugin\Interfaces\PluginInterface; use Elcodi\Plugin\FreePaymentBundle\DependencyInjection\ElcodiFreePaymentExtension; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class ElcodiFreePaymentBundle diff --git a/src/Elcodi/Plugin/PaypalWebCheckoutBundle/ElcodiPaypalWebCheckoutBundle.php b/src/Elcodi/Plugin/PaypalWebCheckoutBundle/ElcodiPaypalWebCheckoutBundle.php index ce578f09..19b1fb50 100644 --- a/src/Elcodi/Plugin/PaypalWebCheckoutBundle/ElcodiPaypalWebCheckoutBundle.php +++ b/src/Elcodi/Plugin/PaypalWebCheckoutBundle/ElcodiPaypalWebCheckoutBundle.php @@ -20,11 +20,11 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; use Elcodi\Component\Plugin\Interfaces\PluginInterface; use Elcodi\Plugin\PaypalWebCheckoutBundle\DependencyInjection\ElcodiPaypalWebCheckoutExtension; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class ElcodiPaypalWebCheckoutBundle diff --git a/src/Elcodi/Plugin/StripeBundle/ElcodiStripeBundle.php b/src/Elcodi/Plugin/StripeBundle/ElcodiStripeBundle.php index c9d6685c..4bd5054b 100644 --- a/src/Elcodi/Plugin/StripeBundle/ElcodiStripeBundle.php +++ b/src/Elcodi/Plugin/StripeBundle/ElcodiStripeBundle.php @@ -20,11 +20,11 @@ use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\HttpKernel\KernelInterface; use Elcodi\Bundle\CoreBundle\Interfaces\DependentBundleInterface; use Elcodi\Component\Plugin\Interfaces\PluginInterface; use Elcodi\Plugin\StripeBundle\DependencyInjection\ElcodiStripeExtension; -use Symfony\Component\HttpKernel\KernelInterface; /** * Class ElcodiStripeBundle