Skip to content

Commit

Permalink
magento/adobe-stock-integration#1504:Extract logic from controller to…
Browse files Browse the repository at this point in the history
… a model to enable before plugin interception of parameters - Test failure fixes. Made store_id parameter optional.
  • Loading branch information
jmonteros422 committed Aug 21, 2020
1 parent c06a44c commit e228d76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function execute()
return $resultRaw->setContents(
$this->getInsertImageContent->execute(
$data['filename'],
(int)$data['store_id'],
$data['force_static_path'],
$data['as_is']
$data['as_is'],
isset($data['store_id']) ? (int) $data['store_id'] : null
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ public function __construct(
* Prepare Image Contents for Insert
*
* @param string $encodedFilename
* @param int $storeId
* @param bool $forceStaticPath
* @param bool $renderAsTag
* @param int|null $storeId
* @return string
*/
public function execute(
string $encodedFilename,
int $storeId,
bool $forceStaticPath,
bool $renderAsTag
bool $renderAsTag,
?int $storeId = null
): string {
$filename = $this->imagesHelper->idDecode($encodedFilename);

Expand Down

0 comments on commit e228d76

Please sign in to comment.