Skip to content

Commit df66cf8

Browse files
committed
Adjusments according review: add interface description and minor code changes
1 parent 33481d0 commit df66cf8

File tree

10 files changed

+14
-11
lines changed

10 files changed

+14
-11
lines changed

app/code/Magento/MediaGallery/Model/Keyword.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function getId(): ?int
3838
/**
3939
* @inheritdoc
4040
*/
41-
public function getKeyword() : string
41+
public function getKeyword(): string
4242
{
4343
return (string)$this->getData(self::KEYWORD);
4444
}

app/code/Magento/MediaGallery/Plugin/Wysiwyg/Images/Storage.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ public function afterDeleteFile(StorageSubject $subject, StorageSubject $result,
8787
try {
8888
$this->deleteMediaAssetByPath->execute($relativePath);
8989
} catch (\Exception $exception) {
90-
$message = __('An error occurred during media asset delete at wysiwyg: %1', $exception->getMessage());
90+
$message = __(
91+
'An error occurred during media asset delete at wysiwyg: %error',
92+
['error' => $exception->getMessage()]
93+
);
9194
$this->logger->critical($message->render());
9295
}
9396

app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use Magento\Framework\Api\ExtensibleDataInterface;
1212

1313
/**
14-
* Asset Interface
15-
*
14+
* Represents a media gallery asset which contains information about a media asset entity such
15+
* as path to the media storage, media asset title and its content type, etc.
1616
*/
1717
interface AssetInterface extends ExtensibleDataInterface
1818
{

app/code/Magento/MediaGalleryApi/Api/Data/KeywordInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Framework\Api\ExtensibleDataInterface;
1212

1313
/**
14-
* Interface KeywordInterface
14+
* Represents a media gallery keyword. This object contains information about a media asset keyword entity.
1515
*/
1616
interface KeywordInterface extends ExtensibleDataInterface
1717
{

app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByPathInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magento\MediaGalleryApi\Model\Asset\Command;
1010

1111
/**
12-
* Interface DeleteByPathInterface
12+
* A command represents the media gallery asset delete action. A media gallery asset is filtered by path value.
1313
*/
1414
interface DeleteByPathInterface
1515
{

app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByIdInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magento\MediaGalleryApi\Model\Asset\Command;
1010

1111
/**
12-
* Interface GetByIdInterface
12+
* A command represents the get media gallery asset by using media gallery asset id as a filter parameter.
1313
*/
1414
interface GetByIdInterface
1515
{

app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByPathInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magento\MediaGalleryApi\Model\Asset\Command;
1010

1111
/**
12-
* Interface GetByPathInterface
12+
* A command represents the get media gallery asset by using media gallery asset path as a filter parameter.
1313
*/
1414
interface GetByPathInterface
1515
{

app/code/Magento/MediaGalleryApi/Model/Asset/Command/SaveInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\MediaGalleryApi\Api\Data\AssetInterface;
1212

1313
/**
14-
* Interface SaveInterface
14+
* A command which executes the media gallery asset save operation.
1515
*/
1616
interface SaveInterface
1717
{

app/code/Magento/MediaGalleryApi/Model/Keyword/Command/GetAssetKeywordsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\MediaGalleryApi\Model\Keyword\Command;
99

1010
/**
11-
* Interface GetAssetKeywordsInterface
11+
* A command represents functionality to get a media gallery asset keywords filtered by media gallery asset id.
1212
*/
1313
interface GetAssetKeywordsInterface
1414
{

app/code/Magento/MediaGalleryApi/Model/Keyword/Command/SaveAssetKeywordsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\MediaGalleryApi\Model\Keyword\Command;
99

1010
/**
11-
* Interface SaveAssetKeywordsInterface
11+
* A command represents the media gallery asset keywords save operation.
1212
*/
1313
interface SaveAssetKeywordsInterface
1414
{

0 commit comments

Comments
 (0)