Skip to content

Commit 6dafb1a

Browse files
committed
fixed tampates,Blocks and Model warnings
1 parent c0844b9 commit 6dafb1a

File tree

124 files changed

+831
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+831
-476
lines changed

Api/AuthorRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
/**
1212
* Interface AuthorRepositoryInterface
13-
* @package Magefan\Blog\Api
1413
*/
1514
interface AuthorRepositoryInterface
1615
{

Api/CategoryRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
/**
1414
* Interface PostRepositoryInterface
15-
* @package Magefan\Blog\Api
1615
*/
1716
interface CategoryRepositoryInterface
1817
{

Api/CommentRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
/**
1414
* Interface CommentRepositoryInterface
15-
* @package Magefan\Blog\Api
1615
*/
1716
interface CommentRepositoryInterface
1817
{

Api/PostRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
/**
1414
* Interface PostRepositoryInterface
15-
* @package Magefan\Blog\Api
1615
*/
1716
interface PostRepositoryInterface
1817
{

Api/SitemapConfigInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
/**
1212
* Interface SitemapConfigInterface
13-
* @package Magefan\Blog\Api
1413
*/
1514
interface SitemapConfigInterface
1615
{

Api/TagRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
/**
1414
* Interface TagRepositoryInterface
15-
* @package Magefan\Blog\Api
1615
*/
1716
interface TagRepositoryInterface
1817
{

Block/Adminhtml/Category/CreateButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Category;
1010

1111
/**
12-
* Class CreateButton
12+
* Class CreateButton block
1313
*/
1414
class CreateButton extends \Magefan\Community\Block\Adminhtml\Edit\CreateButton
1515
{

Block/Adminhtml/Category/DeleteButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Category;
1010

1111
/**
12-
* Class DeleteButton
12+
* Class DeleteButton block
1313
*/
1414
class DeleteButton extends \Magefan\Community\Block\Adminhtml\Edit\DeleteButton
1515
{

Block/Adminhtml/Category/DuplicateButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Category;
1010

1111
/**
12-
* Class DuplicateButton
12+
* Class DuplicateButton block
1313
*/
1414
class DuplicateButton extends \Magefan\Community\Block\Adminhtml\Edit\DuplicateButton
1515
{

Block/Adminhtml/Category/SaveAndContinueButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Category;
1010

1111
/**
12-
* Class SaveAndContinueButton
12+
* Class SaveAndContinueButton block
1313
*/
1414
class SaveAndContinueButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveAndContinueButton
1515
{

Block/Adminhtml/Category/SaveButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Category;
1010

1111
/**
12-
* Class SaveButton
12+
* Class SaveButton block
1313
*/
1414
class SaveButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveButton
1515
{

Block/Adminhtml/Comment/DeleteButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Comment;
1010

1111
/**
12-
* Class DeleteButton
12+
* Class DeleteButton block
1313
*/
1414
class DeleteButton extends \Magefan\Community\Block\Adminhtml\Edit\DeleteButton
1515
{

Block/Adminhtml/Comment/SaveAndContinueButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Comment;
1010

1111
/**
12-
* Class SaveAndContinueButton
12+
* Class SaveAndContinueButton block
1313
*/
1414
class SaveAndContinueButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveAndContinueButton
1515
{

Block/Adminhtml/Comment/SaveButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Comment;
1010

1111
/**
12-
* Class SaveButton
12+
* Class SaveButton block
1313
*/
1414
class SaveButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveButton
1515
{

Block/Adminhtml/Import/Aheadworks/Form.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ protected function _prepareForm()
5757
}
5858
$isElementDisabled = false;
5959

60-
6160
$form->setHtmlIdPrefix('import_');
6261

6362
$fieldset = $form->addFieldset('base_fieldset', ['legend' => '']);
@@ -78,7 +77,9 @@ protected function _prepareForm()
7877
[
7978
'label' => __('NOTICE'),
8079
'name' => 'prefix',
81-
'after_element_html' => 'When the import is completed, please copy featured image files to Magento <strong style="color:#105610;">pub/media/magefan_blog</strong> directory.',
80+
'after_element_html' => 'When the import is completed, please copy featured image files to Magento
81+
<strong style="color:#105610;">pub/media/magefan_blog</strong>
82+
directory.',
8283
]
8384
);
8485

Block/Adminhtml/Import/Wordpress/Form.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ protected function _prepareForm()
6161
}
6262
$isElementDisabled = false;
6363

64-
6564
$form->setHtmlIdPrefix('import_');
6665

6766
$fieldset = $form->addFieldset('base_fieldset', ['legend' => '']);
@@ -82,7 +81,11 @@ protected function _prepareForm()
8281
[
8382
'label' => __('NOTICE'),
8483
'name' => 'prefix',
85-
'after_element_html' => 'When the import is completed successfully, please copy image files from WordPress <strong style="color:#bd1616;">wp-content/uploads</strong> directory to Magento <strong style="color:#105610;">pub/media/magefan_blog</strong> directory.',
84+
'after_element_html' => 'When the import is completed successfully, please copy image files from WordPress
85+
<strong style="color:#bd1616;">wp-content/uploads</strong>
86+
directory to Magento
87+
<strong style="color:#105610;">pub/media/magefan_blog</strong>
88+
directory.',
8689
]
8790
);
8891

@@ -201,7 +204,6 @@ protected function _prepareForm()
201204

202205
$this->setForm($form);
203206

204-
205207
return parent::_prepareForm();
206208
}
207209
}

Block/Adminhtml/Post/DeleteButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Post;
1010

1111
/**
12-
* Class DeleteButton
12+
* Class DeleteButton block
1313
*/
1414
class DeleteButton extends \Magefan\Community\Block\Adminhtml\Edit\DeleteButton
1515
{

Block/Adminhtml/Post/DuplicateButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Post;
1010

1111
/**
12-
* Class DuplicateButton
12+
* Class DuplicateButton block
1313
*/
1414
class DuplicateButton extends \Magefan\Community\Block\Adminhtml\Edit\DuplicateButton
1515
{

Block/Adminhtml/Post/Helper/Form/Gallery/Content.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ public function __construct(
5454
?: ObjectManager::getInstance()->get(\Magento\Backend\Block\DataProviders\ImageUploadConfig::class);
5555
} elseif (class_exists(\Magento\Backend\Block\DataProviders\UploadConfig::class)) {
5656
/* Workaround for Magento 2.2.8 */
57-
$this->imageUploadConfigDataProvider = ObjectManager::getInstance()->get(\Magento\Backend\Block\DataProviders\UploadConfig::class);
57+
$this->imageUploadConfigDataProvider = ObjectManager::getInstance()->get(
58+
\Magento\Backend\Block\DataProviders\UploadConfig::class
59+
);
5860
}
5961
} catch (\Exception $e) {
60-
62+
return $e->getMessage();
6163
}
6264
}
6365

Block/Adminhtml/Post/SaveAndContinueButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Post;
1010

1111
/**
12-
* Class SaveAndContinueButton
12+
* Class SaveAndContinueButton block
1313
*/
1414
class SaveAndContinueButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveAndContinueButton
1515
{

Block/Adminhtml/Post/SaveButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Post;
1010

1111
/**
12-
* Class SaveButton
12+
* Class SaveButton block
1313
*/
1414
class SaveButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveButton
1515
{

Block/Adminhtml/System/Config/Form/CheckEnableInfo.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
namespace Magefan\Blog\Block\Adminhtml\System\Config\Form;
1010

1111
/**
12-
* Class CheckEnableInfo
13-
* @package Magefan\Blog\Block\Adminhtml\System\Config\Form
12+
* Class CheckEnableInfo block
1413
*/
1514
class CheckEnableInfo extends \Magento\Backend\Block\Template
1615
{
1716
/**
18-
* Magefan Blog Plus
17+
* Magefan Blog Plus module
1918
*/
2019
const MAGEFAN_BLOG_PLUS = 'Magefan_BlogPlus';
2120

Block/Adminhtml/System/Config/Form/Info.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
6161
{
6262
$m = $this->moduleList->getOne($this->getModuleName());
6363
$html = '<div style="padding:10px;background-color:#f8f8f8;border:1px solid #ddd;margin-bottom:7px;">
64-
Blog Extension v' . $m['setup_version'] . ' was developed by <a href="https://magefan.com?utm_source=m2admin_blog_config&utm_medium=link&utm_campaign=regular" target="_blank">Magefan</a>.
64+
Blog Extension v' . $m['setup_version'] . ' was developed by
65+
<a href="https://magefan.com?utm_source=m2admin_blog_config&utm_medium=link&utm_campaign=regular"
66+
target="_blank">
67+
Magefan
68+
</a>.
6569
</div>';
6670
$html .= '<style>#row_mfblog_general_key{display:none}</style>';
6771
if ($this->metadata->getEdition() != 'Community' || $this->moduleList->has(self::MAGEFAN_BLOG_PLUS)) {

Block/Adminhtml/System/Config/Form/UpdateInfo.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
use Magefan\Blog\Model\AdminNotificationFeed;
1313

1414
/**
15-
* Class UpdateInfo
16-
* @package Magefan\Blog\Block\Adminhtml\System\Config\Form
15+
* Class UpdateInfo block
1716
*/
1817
class UpdateInfo extends \Magento\Backend\Block\Template
1918
{
@@ -97,7 +96,10 @@ public function getLatestVersion()
9796
$latestVersions = $this->cacheManager->load(self::LATESTS_VERSION_CACHE_KEY);
9897
if (false === $latestVersions) {
9998
try {
100-
$this->curlClient->get('https://m'.'a'.'g'.'e'.'f'.'a'.'n'.'.'.'c'.'o'.'m/media/product-versions.json', []);
99+
$this->curlClient->get(
100+
'https://m'.'a'.'g'.'e'.'f'.'a'.'n'.'.'.'c'.'o'.'m/media/product-versions.json',
101+
[]
102+
);
101103
$latestVersions = (string)$this->curlClient->getBody();
102104
} catch (\Exception $e) {
103105
$latestVersions = '';

Block/Adminhtml/Tag/CreateButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Tag;
1010

1111
/**
12-
* Class CreateButton
12+
* Class CreateButton block
1313
*/
1414
class CreateButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveButton
1515
{

Block/Adminhtml/Tag/DeleteButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Tag;
1010

1111
/**
12-
* Class DeleteButton
12+
* Class DeleteButton block
1313
*/
1414
class DeleteButton extends \Magefan\Community\Block\Adminhtml\Edit\DeleteButton
1515
{

Block/Adminhtml/Tag/SaveAndContinueButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Tag;
1010

1111
/**
12-
* Class SaveAndContinueButton
12+
* Class SaveAndContinueButton block
1313
*/
1414
class SaveAndContinueButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveAndContinueButton
1515
{

Block/Adminhtml/Tag/SaveButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block\Adminhtml\Tag;
1010

1111
/**
12-
* Class SaveButton
12+
* Class SaveButton block
1313
*/
1414
class SaveButton extends \Magefan\Community\Block\Adminhtml\Edit\SaveButton
1515
{

Block/Category/SubCategoryLinks.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public function getSubCategories()
5555
->setOrder('position')
5656
->addFieldToFilter('category_id', ['in' => $this->getCategory()->getChildrenIds(false)]);
5757

58-
5958
return $subCategories;
6059
}
6160

Block/Index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ protected function _getConfigValue($param)
126126
);
127127
}
128128

129-
130129
/**
131130
* Prepare breadcrumbs
132131
*

Block/Infortis/UltraMegamenu/Topmenu.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ protected function _toHtml()
5757

5858
$html .= '
5959
<li class="nav-item level0 level-top classic ' . ($active ? 'active' : '') . ' ' . ($hasChildren ? 'parent nav-item--only-subcategories' : '') . ' ">
60-
<a class="level-top" href="' . $blogNode->getUrl() . '" title="' . $this->escapeHtml($blogNode->getName()) . '">
60+
<a class="level-top"
61+
href="' . $blogNode->getUrl() . '"
62+
title="' . $this->escapeHtml($blogNode->getName()) . '">
6163
<span>' . $this->escapeHtml($blogNode->getName()) . '</span>';
6264
if ($hasChildren) {
6365
$html .= '<span class="caret"></span>';
@@ -71,7 +73,6 @@ protected function _toHtml()
7173
$html .= $this->getSubmenuItemsHtml($children, 1, $max_level);
7274
}
7375

74-
7576
$html .= '</li>';
7677
}
7778

@@ -87,9 +88,13 @@ public function getSubmenuItemsHtml($children, $level = 1, $max_level = 0)
8788
foreach ($children as $child) {
8889
$subChildren = $child->getChildren();
8990
$html .= '<li class="nav-item level' . $level . ' classic">
90-
<a href="' . $child->getUrl() . '"><span>' . $this->escapeHtml($child->getName()) . '</span></a>
91-
' . ($subChildren->count() ? $this->getSubmenuItemsHtml($subChildren, $level+1, $max_level) : '') . '
92-
</li>';
91+
<a href="' . $child->getUrl() . '">
92+
<span>' . $this->escapeHtml($child->getName()) . '</span>
93+
</a>
94+
' . ($subChildren->count() ?
95+
$this->getSubmenuItemsHtml($subChildren, $level+1, $max_level) :
96+
'') . '
97+
</li>';
9398
}
9499
$html .= '</ul>';
95100
}

Block/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Magefan\Blog\Block;
1010

1111
/**
12-
* Class Link
12+
* Class Link block
1313
*/
1414
class Link extends \Magento\Framework\View\Element\Html\Link
1515
{

Block/Post/View/Comments/Facebook.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,13 @@
1616
class Facebook extends \Magefan\Blog\Block\Post\View\Comments
1717
{
1818
protected $commetType = CommetType::FACEBOOK;
19-
}
19+
20+
public function getFbSdkJsUrl()
21+
{
22+
$url = 'http://connect.facebook.net/'.
23+
$this->getLocaleCode() . '/sdk.js#xfbml=1&version=v3.3&appId=' .
24+
$this->getFacebookAppId() . '&autoLogAppEvents=1';
25+
26+
return str_replace('amp;','', $url);
27+
}
28+
}

Block/Post/View/Comments/Magefan/Comment.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class Comment extends \Magento\Framework\View\Element\Template implements \Magen
2929
*/
3030
protected $_template = 'Magefan_Blog::post/view/comments/magefan/comment.phtml';
3131

32-
3332
/**
3433
* Retrieve identities
3534
*

Block/Post/View/Gallery.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@
1515
class Gallery extends \Magefan\Blog\Block\Post\AbstractPost
1616
{
1717

18-
1918
}

0 commit comments

Comments
 (0)