@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | public function load(array $config, ContainerBuilder $container) |
| 28 | 28 | { |
| 29 | 29 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
| 30 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 30 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 31 | 31 | |
| 32 | 32 | $loader->load('services.xml'); |
| 33 | 33 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | foreach ($resources as $subjectName => $subjectConfig) { |
| 57 | 57 | foreach ($subjectConfig as $resourceName => $resourceConfig) { |
| 58 | 58 | if (is_array($resourceConfig)) { |
| 59 | - $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig; |
|
| 59 | + $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig; |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $parameterName = $this->getParameterName($field); |
| 66 | 66 | $this->queryBuilder->setParameter($parameterName, $value); |
| 67 | 67 | |
| 68 | - return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':'.$parameterName); |
|
| 68 | + return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':' . $parameterName); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $parameterName = $this->getParameterName($field); |
| 77 | 77 | $this->queryBuilder->setParameter($parameterName, $value); |
| 78 | 78 | |
| 79 | - return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':'.$parameterName); |
|
| 79 | + return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':' . $parameterName); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $parameterName = $this->getParameterName($field); |
| 88 | 88 | $this->queryBuilder->setParameter($parameterName, $value); |
| 89 | 89 | |
| 90 | - $this->queryBuilder->andWhere($this->getFieldName($field).' < :'.$parameterName); |
|
| 90 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' < :' . $parameterName); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $parameterName = $this->getParameterName($field); |
| 99 | 99 | $this->queryBuilder->setParameter($parameterName, $value); |
| 100 | 100 | |
| 101 | - $this->queryBuilder->andWhere($this->getFieldName($field).' <= :'.$parameterName); |
|
| 101 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' <= :' . $parameterName); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $parameterName = $this->getParameterName($field); |
| 110 | 110 | $this->queryBuilder->setParameter($parameterName, $value); |
| 111 | 111 | |
| 112 | - $this->queryBuilder->andWhere($this->getFieldName($field).' > :'.$parameterName); |
|
| 112 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' > :' . $parameterName); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $parameterName = $this->getParameterName($field); |
| 121 | 121 | $this->queryBuilder->setParameter($parameterName, $value); |
| 122 | 122 | |
| 123 | - $this->queryBuilder->andWhere($this->getFieldName($field).' >= :'.$parameterName); |
|
| 123 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' >= :' . $parameterName); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | private function getFieldName($field) |
| 194 | 194 | { |
| 195 | 195 | if (false === strpos($field, '.')) { |
| 196 | - return $this->queryBuilder->getRootAlias().'.'.$field; |
|
| 196 | + return $this->queryBuilder->getRootAlias() . '.' . $field; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | return $field; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function load(array $config, ContainerBuilder $container) |
| 30 | 30 | { |
| 31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 32 | 32 | $loader->load('services.xml'); |
| 33 | 33 | $loader->load('twig.xml'); |
| 34 | 34 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function load(array $config, ContainerBuilder $container) |
| 45 | 45 | { |
| 46 | 46 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
| 47 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 47 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 48 | 48 | |
| 49 | 49 | $loader->load(sprintf('services/integrations/%s.xml', $config['driver'])); |
| 50 | 50 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | foreach ($resources as $variableName => $variableConfig) { |
| 70 | 70 | foreach ($variableConfig as $resourceName => $resourceConfig) { |
| 71 | 71 | if (is_array($resourceConfig)) { |
| 72 | - $resolvedResources[$variableName.'_'.$resourceName] = $resourceConfig; |
|
| 72 | + $resolvedResources[$variableName . '_' . $resourceName] = $resourceConfig; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function load(array $config, ContainerBuilder $container) |
| 29 | 29 | { |
| 30 | 30 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
| 31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 32 | 32 | |
| 33 | 33 | $loader->load(sprintf('driver/%s.xml', $config['driver'])); |
| 34 | 34 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | return; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 93 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 94 | 94 | $loader->load('resource_integration.xml'); |
| 95 | 95 | |
| 96 | 96 | $container->prependExtensionConfig('sylius_resource', [ |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | parent::tearDown(); |
| 24 | 24 | |
| 25 | - file_put_contents(__DIR__.'/../Fixtures/themes/FirstTestTheme/TestBundle/public/theme_asset.txt', 'Theme asset'.PHP_EOL); |
|
| 25 | + file_put_contents(__DIR__ . '/../Fixtures/themes/FirstTestTheme/TestBundle/public/theme_asset.txt', 'Theme asset' . PHP_EOL); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $client->getContainer()->get('sylius.theme.asset.assets_installer')->installAssets($webDirectory, $symlinkMask); |
| 59 | 59 | |
| 60 | 60 | sleep(1); |
| 61 | - file_put_contents(__DIR__.'/../Fixtures/themes/FirstTestTheme/TestBundle/public/theme_asset.txt', 'Theme asset modified'); |
|
| 61 | + file_put_contents(__DIR__ . '/../Fixtures/themes/FirstTestTheme/TestBundle/public/theme_asset.txt', 'Theme asset modified'); |
|
| 62 | 62 | clearstatcache(); |
| 63 | 63 | |
| 64 | 64 | $client->getContainer()->get('sylius.theme.asset.assets_installer')->installAssets($webDirectory, $symlinkMask); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | private function createWebDirectory() |
| 93 | 93 | { |
| 94 | - $webDirectory = $this->getTmpDirPath(self::TEST_CASE).'/web'; |
|
| 94 | + $webDirectory = $this->getTmpDirPath(self::TEST_CASE) . '/web'; |
|
| 95 | 95 | if (!is_dir($webDirectory)) { |
| 96 | 96 | mkdir($webDirectory, 0777, true); |
| 97 | 97 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | list($expectedText, $assetFile) = explode(': ', $line); |
| 112 | 112 | |
| 113 | - $contents = file_get_contents($webDirectory.$assetFile); |
|
| 113 | + $contents = file_get_contents($webDirectory . $assetFile); |
|
| 114 | 114 | |
| 115 | 115 | $this->assertEquals($expectedText, trim($contents)); |
| 116 | 116 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $client = $this->getClient(); |
| 28 | 28 | |
| 29 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 29 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 30 | 30 | $this->assertEquals($contents, trim($crawler->text())); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | { |
| 55 | 55 | $client = $this->getClient(); |
| 56 | 56 | |
| 57 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 57 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 58 | 58 | $this->assertEquals($contents, trim($crawler->text())); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $client = $this->getClient(); |
| 84 | 84 | |
| 85 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 85 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 86 | 86 | $this->assertEquals($contents, trim($crawler->text())); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | { |
| 109 | 109 | $client = $this->getClient(); |
| 110 | 110 | |
| 111 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
| 111 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
| 112 | 112 | $this->assertEquals($contents, trim($crawler->text())); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function load(array $config, ContainerBuilder $container) |
| 29 | 29 | { |
| 30 | 30 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
| 31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 32 | 32 | |
| 33 | 33 | $loader->load(sprintf('driver/%s.xml', $config['driver'])); |
| 34 | 34 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | return; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 93 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 94 | 94 | $loader->load('resource_integration.xml'); |
| 95 | 95 | |
| 96 | 96 | $container->prependExtensionConfig('sylius_resource', [ |
@@ -66,33 +66,33 @@ |
||
| 66 | 66 | |
| 67 | 67 | $m = 0; |
| 68 | 68 | foreach ($order->getItems() as $item) { |
| 69 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = $item->getVariant()->getProduct()->getName(); |
|
| 70 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($item->getDiscountedUnitPrice(), $order->getCurrencyCode()); |
|
| 71 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = $item->getQuantity(); |
|
| 69 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = $item->getVariant()->getProduct()->getName(); |
|
| 70 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($item->getDiscountedUnitPrice(), $order->getCurrencyCode()); |
|
| 71 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = $item->getQuantity(); |
|
| 72 | 72 | |
| 73 | 73 | ++$m; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | if (0 !== $taxTotal = $order->getAdjustmentsTotalRecursively(AdjustmentInterface::TAX_ADJUSTMENT)) { |
| 77 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Tax Total'; |
|
| 78 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($taxTotal, $order->getCurrencyCode()); |
|
| 79 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
| 77 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Tax Total'; |
|
| 78 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($taxTotal, $order->getCurrencyCode()); |
|
| 79 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
| 80 | 80 | |
| 81 | 81 | ++$m; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if (0 !== $promotionTotal = $order->getOrderPromotionTotal()) { |
| 85 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Discount'; |
|
| 86 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($promotionTotal, $order->getCurrencyCode()); |
|
| 87 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
| 85 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Discount'; |
|
| 86 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($promotionTotal, $order->getCurrencyCode()); |
|
| 87 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
| 88 | 88 | |
| 89 | 89 | ++$m; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (0 !== $shippingTotal = $order->getShippingTotal()) { |
| 93 | - $details['L_PAYMENTREQUEST_0_NAME'.$m] = 'Shipping Total'; |
|
| 94 | - $details['L_PAYMENTREQUEST_0_AMT'.$m] = $this->convertAndFormatPrice($shippingTotal, $order->getCurrencyCode()); |
|
| 95 | - $details['L_PAYMENTREQUEST_0_QTY'.$m] = 1; |
|
| 93 | + $details['L_PAYMENTREQUEST_0_NAME' . $m] = 'Shipping Total'; |
|
| 94 | + $details['L_PAYMENTREQUEST_0_AMT' . $m] = $this->convertAndFormatPrice($shippingTotal, $order->getCurrencyCode()); |
|
| 95 | + $details['L_PAYMENTREQUEST_0_QTY' . $m] = 1; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $request->setResult($details); |