@@ -251,10 +251,10 @@ |
||
| 251 | 251 | ); |
| 252 | 252 | $table->addIndex( |
| 253 | 253 | ['combined_price_list_id', |
| 254 | - 'product_id', |
|
| 255 | - 'unit_code', |
|
| 256 | - 'quantity', |
|
| 257 | - 'currency'], |
|
| 254 | + 'product_id', |
|
| 255 | + 'unit_code', |
|
| 256 | + 'quantity', |
|
| 257 | + 'currency'], |
|
| 258 | 258 | 'oro_combined_price_idx' |
| 259 | 259 | ); |
| 260 | 260 | $table->addIndex( |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | ->method('round') |
| 61 | 61 | ->will( |
| 62 | 62 | $this->returnCallback( |
| 63 | - function ($value) { |
|
| 63 | + function($value) { |
|
| 64 | 64 | return round($value, 0, PHP_ROUND_HALF_UP); |
| 65 | 65 | } |
| 66 | 66 | ) |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | ->disableOriginalConstructor()->getMock(); |
| 36 | 36 | $this->numberFormatter->expects($this->any()) |
| 37 | 37 | ->method('formatCurrency') |
| 38 | - ->will($this->returnCallback(function ($price, $currencyIsoCode) { |
|
| 38 | + ->will($this->returnCallback(function($price, $currencyIsoCode) { |
|
| 39 | 39 | return sprintf('%.2f %s formatted_price', $price, $currencyIsoCode); |
| 40 | 40 | })); |
| 41 | 41 | $this->unitLabelFormatter = $this |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ->disableOriginalConstructor()->getMock(); |
| 44 | 44 | $this->unitLabelFormatter->expects($this->any()) |
| 45 | 45 | ->method('format') |
| 46 | - ->will($this->returnCallback(function ($unit) { |
|
| 46 | + ->will($this->returnCallback(function($unit) { |
|
| 47 | 47 | return sprintf('%s formatted_unit', $unit); |
| 48 | 48 | })); |
| 49 | 49 | $this->unitValueFormatter = $this |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | ->disableOriginalConstructor()->getMock(); |
| 52 | 52 | $this->unitValueFormatter->expects($this->any()) |
| 53 | 53 | ->method('formatCode') |
| 54 | - ->will($this->returnCallback(function ($quantity, $unit) { |
|
| 54 | + ->will($this->returnCallback(function($quantity, $unit) { |
|
| 55 | 55 | return sprintf('%d %s quantity_with_unit', $quantity, $unit); |
| 56 | 56 | })); |
| 57 | 57 | $this->formatter = new ProductPriceFormatter( |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | |
| 219 | 219 | $this->assertEquals( |
| 220 | 220 | [ |
| 221 | - ['unit' => 'set', 'USD' => 110, 'EURO' => 95, 'GBP' => 34,], |
|
| 221 | + ['unit' => 'set', 'USD' => 110, 'EURO' => 95, 'GBP' => 34, ], |
|
| 222 | 222 | ], |
| 223 | 223 | $this->arrayDatasource->getArraySource() |
| 224 | 224 | ); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ->method('trans') |
| 55 | 55 | ->with($this->isType('string')) |
| 56 | 56 | ->willReturnCallback( |
| 57 | - function ($id, array $params = []) { |
|
| 57 | + function($id, array $params = []) { |
|
| 58 | 58 | $id = str_replace(array_keys($params), array_values($params), $id); |
| 59 | 59 | |
| 60 | 60 | return $id . '.trans'; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | 'AND price_column_usd_unit1_table.currency = \'USD\' ' . |
| 247 | 247 | 'AND price_column_usd_unit1_table.priceList = 1 ' . |
| 248 | 248 | 'AND price_column_usd_unit1_table.quantity = 1 ' . |
| 249 | - 'AND price_column_usd_unit1_table.unit = \'unit1\'' , |
|
| 249 | + 'AND price_column_usd_unit1_table.unit = \'unit1\'', |
|
| 250 | 250 | ], |
| 251 | 251 | 3 => [ |
| 252 | 252 | 'join' => 'OroPricingBundle:ProductPrice', |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | |
| 68 | 68 | $event = $this->createMock('Doctrine\ORM\Event\LifecycleEventArgs'); |
| 69 | 69 | |
| 70 | - $repository =$this->createMock('Oro\Bundle\PricingBundle\Entity\Repository\ProductPriceRepository'); |
|
| 70 | + $repository = $this->createMock('Oro\Bundle\PricingBundle\Entity\Repository\ProductPriceRepository'); |
|
| 71 | 71 | $repository->expects($this->once()) |
| 72 | 72 | ->method('deleteByProductUnit') |
| 73 | 73 | ->with($this->shardManager, $product, $unit); |
@@ -97,9 +97,9 @@ |
||
| 97 | 97 | 'join' => 'OroPricingBundle:PriceAttributeProductPrice', |
| 98 | 98 | 'alias' => 'price_attribute_price_column_usd_1_table', |
| 99 | 99 | 'conditionType' => 'WITH', |
| 100 | - 'condition' => 'price_attribute_price_column_usd_1_table.product = product.id'. |
|
| 101 | - ' AND price_attribute_price_column_usd_1_table.currency = \'USD\''. |
|
| 102 | - ' AND price_attribute_price_column_usd_1_table.priceList = 1'. |
|
| 100 | + 'condition' => 'price_attribute_price_column_usd_1_table.product = product.id' . |
|
| 101 | + ' AND price_attribute_price_column_usd_1_table.currency = \'USD\'' . |
|
| 102 | + ' AND price_attribute_price_column_usd_1_table.priceList = 1' . |
|
| 103 | 103 | ' AND price_attribute_price_column_usd_1_table.quantity = 1', |
| 104 | 104 | ], |
| 105 | 105 | ], |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | ) |
| 77 | 77 | ->will( |
| 78 | 78 | $this->returnCallback( |
| 79 | - function ($param) { |
|
| 79 | + function($param) { |
|
| 80 | 80 | return $param . $this->translatedLabel; |
| 81 | 81 | } |
| 82 | 82 | ) |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $this->assertExportTemplateWorks( |
| 37 | 37 | $this->getPriceAttributeProductPriceConfiguration(), |
| 38 | - __DIR__.'/data/price_attribute_product_price/export_template.csv' |
|
| 38 | + __DIR__ . '/data/price_attribute_product_price/export_template.csv' |
|
| 39 | 39 | ); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $this->assertExportWorks( |
| 45 | 45 | $this->getPriceAttributeProductPriceConfiguration(), |
| 46 | - __DIR__.'/data/price_attribute_product_price/export.csv' |
|
| 46 | + __DIR__ . '/data/price_attribute_product_price/export.csv' |
|
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | $this->assertImportWorks( |
| 53 | 53 | $this->getPriceAttributeProductPriceConfiguration(), |
| 54 | - __DIR__.'/data/price_attribute_product_price/import.csv' |
|
| 54 | + __DIR__ . '/data/price_attribute_product_price/import.csv' |
|
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | $this->assertImportedDataValid(); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | $this->assertImportWorks( |
| 77 | 77 | $configuration, |
| 78 | - __DIR__.'/data/price_attribute_product_price/import_reset_and_add.csv' |
|
| 78 | + __DIR__ . '/data/price_attribute_product_price/import_reset_and_add.csv' |
|
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | 81 | $this->assertResetAndAddValid(); |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | $this->assertImportValidateWorks( |
| 92 | 92 | $this->getPriceAttributeProductPriceConfiguration(), |
| 93 | - __DIR__.'/data/price_attribute_product_price/import_wrong_data.csv', |
|
| 94 | - __DIR__.'/data/price_attribute_product_price/import_validation_errors.json' |
|
| 93 | + __DIR__ . '/data/price_attribute_product_price/import_wrong_data.csv', |
|
| 94 | + __DIR__ . '/data/price_attribute_product_price/import_validation_errors.json' |
|
| 95 | 95 | ); |
| 96 | 96 | } |
| 97 | 97 | |