Skip to content

Commit

Permalink
static test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Jun 18, 2020
1 parent a2d5113 commit 3bc8239
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class CategoryDelete implements ObserverInterface
private $contentIdentityFactory;

/**
* @var ContentAssetLinkInterfaceFactory
*/
* @var ContentAssetLinkInterfaceFactory
*/
private $contentAssetLinkFactory;

/**
Expand Down Expand Up @@ -62,6 +62,7 @@ class CategoryDelete implements ObserverInterface
* @param DeleteContentAssetLinksInterface $deleteContentAssetLinks
* @param ContentIdentityInterfaceFactory $contentIdentityFactory
* @param ContentAssetLinkInterfaceFactory $contentAssetLinkFactory
* @param array $fields
*/
public function __construct(
ExtractAssetsFromContentInterface $extractAssetsFromContent,
Expand All @@ -88,7 +89,7 @@ public function __construct(
public function execute(Observer $observer): void
{
$model = $observer->getEvent()->getData('category');
$contentAssetsLinks = [];
$contentAssetLinks = [];

if ($model instanceof CatalogCategory) {
foreach ($this->fields as $field) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ProductDelete implements ObserverInterface
private $contentIdentityFactory;

/**
* @var ContentAssetLinkInterfaceFactory
*/
* @var ContentAssetLinkInterfaceFactory
*/
private $contentAssetLinkFactory;

/**
Expand Down Expand Up @@ -62,6 +62,7 @@ class ProductDelete implements ObserverInterface
* @param DeleteContentAssetLinksInterface $deleteContentAssetLinks
* @param ContentIdentityInterfaceFactory $contentIdentityFactory
* @param ContentAssetLinkInterfaceFactory $contentAssetLinkFactory
* @param array $fields
*/
public function __construct(
ExtractAssetsFromContentInterface $extractAssetsFromContent,
Expand All @@ -88,7 +89,7 @@ public function __construct(
public function execute(Observer $observer): void
{
$model = $observer->getEvent()->getData('product');
$contentAssetsLinks = [];
$contentAssetLinks = [];

if ($model instanceof CatalogProduct) {
foreach ($this->fields as $field) {
Expand Down
7 changes: 4 additions & 3 deletions app/code/Magento/MediaContentCms/Observer/BlockDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class BlockDelete implements ObserverInterface
private $contentIdentityFactory;

/**
* @var ContentAssetLinkInterfaceFactory
*/
* @var ContentAssetLinkInterfaceFactory
*/
private $contentAssetLinkFactory;

/**
Expand Down Expand Up @@ -62,6 +62,7 @@ class BlockDelete implements ObserverInterface
* @param DeleteContentAssetLinksInterface $deleteContentAssetLinks
* @param ContentIdentityInterfaceFactory $contentIdentityFactory
* @param ContentAssetLinkInterfaceFactory $contentAssetLinkFactory
* @param array $fields
*/
public function __construct(
ExtractAssetsFromContentInterface $extractAssetsFromContent,
Expand All @@ -88,7 +89,7 @@ public function __construct(
public function execute(Observer $observer): void
{
$model = $observer->getEvent()->getData('object');
$contentAssetsLinks = [];
$contentAssetLinks = [];

if ($model instanceof CmsBlock) {
foreach ($this->fields as $field) {
Expand Down
9 changes: 5 additions & 4 deletions app/code/Magento/MediaContentCms/Observer/PageDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Magento\MediaContentApi\Api\ExtractAssetsFromContentInterface;

/**
* Observe the adminhtml_cmspage_on_delete event and deletes relation between page content and media asset.
* Observe the cms_page_delete_before event and deletes relation between page content and media asset.
*/
class PageDelete implements ObserverInterface
{
Expand All @@ -32,8 +32,8 @@ class PageDelete implements ObserverInterface
private $contentIdentityFactory;

/**
* @var ContentAssetLinkInterfaceFactory
*/
* @var ContentAssetLinkInterfaceFactory
*/
private $contentAssetLinkFactory;

/**
Expand Down Expand Up @@ -62,6 +62,7 @@ class PageDelete implements ObserverInterface
* @param DeleteContentAssetLinksInterface $deleteContentAssetLinks
* @param ContentIdentityInterfaceFactory $contentIdentityFactory
* @param ContentAssetLinkInterfaceFactory $contentAssetLinkFactory
* @param arry $fields
*/
public function __construct(
ExtractAssetsFromContentInterface $extractAssetsFromContent,
Expand All @@ -88,7 +89,7 @@ public function __construct(
public function execute(Observer $observer): void
{
$model = $observer->getEvent()->getData('object');
$contentAssetsLinks = [];
$contentAssetLinks = [];

if ($model instanceof CmsPage) {
foreach ($this->fields as $field) {
Expand Down

0 comments on commit 3bc8239

Please sign in to comment.