Skip to content

Commit 8d1a45f

Browse files
committed
Remove useless parentheses
1 parent d69f3e8 commit 8d1a45f

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function execute()
5151
$productId = (int) $this->getRequest()->getParam('id');
5252
$product = $this->productBuilder->build($this->getRequest());
5353

54-
if (($productId && !$product->getEntityId())) {
54+
if ($productId && !$product->getEntityId()) {
5555
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
5656
$resultRedirect = $this->resultRedirectFactory->create();
5757
$this->messageManager->addErrorMessage(__('This product doesn\'t exist.'));

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ public function setupAttributeMeta(ProductAttributeInterface $attribute, $groupC
726726

727727
// TODO: getAttributeModel() should not be used when MAGETWO-48284 is complete
728728
$childData = $this->arrayManager->get($configPath, $meta, []);
729-
if (($rules = $this->catalogEavValidationRules->build($this->getAttributeModel($attribute), $childData))) {
729+
if ($rules = $this->catalogEavValidationRules->build($this->getAttributeModel($attribute), $childData)) {
730730
$meta = $this->arrayManager->merge($configPath, $meta, ['validation' => $rules]);
731731
}
732732

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function setDeployment($description, $change = false, $user = false)
8888
return false;
8989
}
9090

91-
if (($response->getStatus() < 200 || $response->getStatus() > 210)) {
91+
if ($response->getStatus() < 200 || $response->getStatus() > 210) {
9292
$this->logger->warning('Deployment marker request did not send a 200 status code.');
9393
return false;
9494
}

app/code/Magento/Persistent/Observer/MakePersistentQuoteGuestObserver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
6565
/** @var $action \Magento\Persistent\Controller\Index */
6666
$action = $observer->getEvent()->getControllerAction();
6767
if ($action instanceof \Magento\Persistent\Controller\Index) {
68-
if ((($this->_persistentSession->isPersistent() && !$this->_customerSession->isLoggedIn())
69-
|| $this->_persistentData->isShoppingCartPersist())
68+
if (($this->_persistentSession->isPersistent() && !$this->_customerSession->isLoggedIn())
69+
|| $this->_persistentData->isShoppingCartPersist()
7070
) {
7171
$this->quoteManager->setGuest(true);
7272
}

app/code/Magento/Ui/Component/Control/SplitButton.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ public function getButtonAttributesHtml()
8383
'style' => $this->getStyle(),
8484
];
8585

86-
if (($idHard = $this->getIdHard())) {
86+
if ($idHard = $this->getIdHard()) {
8787
$attributes['id'] = $idHard;
8888
}
8989

9090
//TODO perhaps we need to skip data-mage-init when disabled="disabled"
91-
if (($dataAttribute = $this->getDataAttribute())) {
91+
if ($dataAttribute = $this->getDataAttribute()) {
9292
$this->getDataAttributes($dataAttribute, $attributes);
9393
}
9494

@@ -112,7 +112,7 @@ public function getToggleAttributesHtml()
112112
$title = $this->getLabel();
113113
}
114114

115-
if (($currentClass = $this->getClass())) {
115+
if ($currentClass = $this->getClass()) {
116116
$classes[] = $currentClass;
117117
}
118118

dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TaxClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class TaxClass extends DataSource
5252
public function __construct(FixtureFactory $fixtureFactory, array $params, $data = [])
5353
{
5454
$this->params = $params;
55-
if ((!isset($data['dataset']) && !isset($data['tax_product_class']))) {
55+
if (!isset($data['dataset']) && !isset($data['tax_product_class'])) {
5656
$this->data = $data;
5757
return;
5858
}

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ private function createModulesConfig($request, $dryRun = false)
429429
$disable = $this->readListOfModules($all, $request, InstallCommand::INPUT_KEY_DISABLE_MODULES);
430430
$result = [];
431431
foreach ($all as $module) {
432-
if ((isset($currentModules[$module]) && !$currentModules[$module])) {
432+
if (isset($currentModules[$module]) && !$currentModules[$module]) {
433433
$result[$module] = 0;
434434
} else {
435435
$result[$module] = 1;
@@ -925,7 +925,7 @@ private function throwExceptionForNotWritablePaths(array $paths)
925925
*/
926926
private function handleDBSchemaData($setup, $type, array $request)
927927
{
928-
if (!(($type === 'schema') || ($type === 'data'))) {
928+
if (!($type === 'schema' || $type === 'data')) {
929929
throw new \Magento\Setup\Exception("Unsupported operation type $type is requested");
930930
}
931931
$resource = new \Magento\Framework\Module\ModuleResource($this->context);

0 commit comments

Comments
 (0)