Skip to content

Commit 6766a8e

Browse files
committed
CCENG-104: Public Pull Request Processing
- fixes based on static test reports
1 parent bb4ff07 commit 6766a8e

File tree

9 files changed

+53
-26
lines changed

9 files changed

+53
-26
lines changed

app/code/Magento/Catalog/Model/Product/Price/BasePriceStorage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class BasePriceStorage implements BasePriceStorageInterface
2727
{
2828
/**
29-
* Attribute code.
29+
* Price attribute code.
3030
*
3131
* @var string
3232
*/
@@ -78,14 +78,14 @@ class BasePriceStorage implements BasePriceStorageInterface
7878
private $productAttributeRepository;
7979

8080
/**
81-
* Price type allowed.
81+
* Is price type allowed
8282
*
8383
* @var int
8484
*/
8585
private $priceTypeAllowed = 1;
8686

8787
/**
88-
* Allowed product types.
88+
* Array of allowed product types.
8989
*
9090
* @var array
9191
*/

app/code/Magento/NewRelicReporting/Console/Command/DeployMarker.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DeployMarker extends Command
2929
*
3030
* @param DeploymentsFactory $deploymentsFactory
3131
* @param ServiceShellUser $serviceShellUser
32-
* @param null $name
32+
* @param ?string $name
3333
*/
3434
public function __construct(
3535
DeploymentsFactory $deploymentsFactory,
@@ -42,7 +42,7 @@ public function __construct(
4242
}
4343

4444
/**
45-
* {@inheritdoc}
45+
* @inheritdoc
4646
*/
4747
protected function configure()
4848
{
@@ -71,7 +71,7 @@ protected function configure()
7171
}
7272

7373
/**
74-
* {@inheritdoc}
74+
* @inheritdoc
7575
*/
7676
protected function execute(InputInterface $input, OutputInterface $output)
7777
{
@@ -82,5 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8282
$input->getArgument('revision')
8383
);
8484
$output->writeln('<info>NewRelic deployment information sent</info>');
85+
86+
return 0;
8587
}
8688
}

app/code/Magento/NewRelicReporting/Model/Apm/Deployments.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Deployments
1515
/**
1616
* API URL for New Relic deployments
1717
*/
18-
const API_URL = 'https://api.newrelic.com/v2/applications/%s/deployments.json';
18+
private const API_URL = 'https://api.newrelic.com/v2/applications/%s/deployments.json';
1919

2020
/**
2121
* @var \Magento\NewRelicReporting\Model\Config
@@ -55,6 +55,7 @@ public function __construct(
5555
* @param string $description
5656
* @param bool $change
5757
* @param bool $user
58+
* @param ?string $revision
5859
*
5960
* @return bool|string
6061
*/

app/code/Magento/NewRelicReporting/Test/Unit/Model/Apm/DeploymentsTest.php

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ public function testSetDeploymentRequestOk()
126126
->method('create')
127127
->willReturn($this->zendClientMock);
128128

129-
$this->assertIsString($this->model->setDeployment($data['description'], $data['change'], $data['user'], $data['revision']));
129+
$this->assertIsString(
130+
$this->model->setDeployment(
131+
$data['description'],
132+
$data['change'],
133+
$data['user'],
134+
$data['revision']
135+
)
136+
);
130137
}
131138

132139
/**
@@ -183,7 +190,14 @@ public function testSetDeploymentBadStatus()
183190
->method('create')
184191
->willReturn($this->zendClientMock);
185192

186-
$this->assertIsBool($this->model->setDeployment($data['description'], $data['change'], $data['user'], $data['revision']));
193+
$this->assertIsBool(
194+
$this->model->setDeployment(
195+
$data['description'],
196+
$data['change'],
197+
$data['user'],
198+
$data['revision']
199+
)
200+
);
187201
}
188202

189203
/**
@@ -234,7 +248,14 @@ public function testSetDeploymentRequestFail()
234248
->method('create')
235249
->willReturn($this->zendClientMock);
236250

237-
$this->assertIsBool($this->model->setDeployment($data['description'], $data['change'], $data['user'], $data['revision']));
251+
$this->assertIsBool(
252+
$this->model->setDeployment(
253+
$data['description'],
254+
$data['change'],
255+
$data['user'],
256+
$data['revision']
257+
)
258+
);
238259
}
239260

240261
/**

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryPriceModeWebsiteChangePriceTest.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Catalog\Api;
89

@@ -12,13 +13,13 @@
1213

1314
class ProductRepositoryPriceModeWebsiteChangePriceTest extends WebapiAbstract
1415
{
15-
const SERVICE_NAME = 'catalogProductRepositoryV1';
16-
const PRICE_SERVICE_NAME = 'catalogBasePriceStorageV1';
17-
const SERVICE_VERSION = 'V1';
18-
const PRODUCTS_RESOURCE_PATH = '/V1/products';
19-
const PRICES_RESOURCE_PATH = '/V1/products/base-prices';
20-
const STORE1_CODE_FROM_FIXTURE = 'fixturestore';
21-
const STORE2_CODE_FROM_FIXTURE = 'fixture_second_store';
16+
private const SERVICE_NAME = 'catalogProductRepositoryV1';
17+
private const PRICE_SERVICE_NAME = 'catalogBasePriceStorageV1';
18+
private const SERVICE_VERSION = 'V1';
19+
private const PRODUCTS_RESOURCE_PATH = '/V1/products';
20+
private const PRICES_RESOURCE_PATH = '/V1/products/base-prices';
21+
private const STORE1_CODE_FROM_FIXTURE = 'fixturestore';
22+
private const STORE2_CODE_FROM_FIXTURE = 'fixture_second_store';
2223

2324
/**
2425
* @magentoApiDataFixture Magento/Store/_files/core_fixturestore.php

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductTierPriceManagementTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
*/
1515
class ProductTierPriceManagementTest extends WebapiAbstract
1616
{
17-
const SERVICE_NAME = 'catalogProductTierPriceManagementV1';
18-
const SERVICE_VERSION = 'V1';
19-
const RESOURCE_PATH = '/V1/products/';
17+
private const SERVICE_NAME = 'catalogProductTierPriceManagementV1';
18+
private const SERVICE_VERSION = 'V1';
19+
private const RESOURCE_PATH = '/V1/products/';
2020

2121
/**
2222
* @magentoApiDataFixture Magento/Catalog/_files/product_simple.php

dev/tests/api-functional/testsuite/Magento/Catalog/Api/SpecialPriceStorageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
*/
2424
class SpecialPriceStorageTest extends WebapiAbstract
2525
{
26-
const SERVICE_NAME = 'catalogSpecialPriceStorageV1';
27-
const SERVICE_VERSION = 'V1';
28-
const SIMPLE_PRODUCT_SKU = 'simple';
29-
const VIRTUAL_PRODUCT_SKU = 'virtual-product';
26+
private const SERVICE_NAME = 'catalogSpecialPriceStorageV1';
27+
private const SERVICE_VERSION = 'V1';
28+
private const SIMPLE_PRODUCT_SKU = 'simple';
29+
private const VIRTUAL_PRODUCT_SKU = 'virtual-product';
3030
private const PRODUCT_SKU_TWO_WEBSITES = 'simple-on-two-websites';
3131

3232
/**

setup/src/Magento/Setup/Module/Di/App/Task/Operation/ApplicationCodeGenerator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(
5252
}
5353

5454
/**
55-
* {@inheritdoc}
55+
* @inheritdoc
5656
*/
5757
public function doOperation()
5858
{
@@ -86,6 +86,8 @@ public function getName()
8686
}
8787

8888
/**
89+
* Get list if files.
90+
*
8991
* @param string[] $paths
9092
* @return array
9193
* @throws FileSystemException

setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function __construct(
6363
}
6464

6565
/**
66-
* {@inheritdoc}
66+
* @inheritdoc
6767
*/
6868
public function doOperation()
6969
{

0 commit comments

Comments
 (0)