Skip to content

Commit 82dd87d

Browse files
authored
remove redundant else and use strict check
1 parent 2e8d837 commit 82dd87d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,15 @@ public function convertFrom(ProductAttributeMediaGalleryEntryInterface $entry)
100100
protected function convertFromMediaGalleryEntryContentInterface(
101101
ImageContentInterface $content = null
102102
) {
103-
if ($content == null) {
103+
if ($content === null) {
104104
return null;
105-
} else {
106-
return [
107-
'data' => [
108-
ImageContentInterface::BASE64_ENCODED_DATA => $content->getBase64EncodedData(),
109-
ImageContentInterface::TYPE => $content->getType(),
110-
ImageContentInterface::NAME => $content->getName(),
111-
],
112-
];
113-
}
105+
}
106+
return [
107+
'data' => [
108+
ImageContentInterface::BASE64_ENCODED_DATA => $content->getBase64EncodedData(),
109+
ImageContentInterface::TYPE => $content->getType(),
110+
ImageContentInterface::NAME => $content->getName(),
111+
],
112+
];
114113
}
115114
}

0 commit comments

Comments
 (0)