Skip to content

Commit ba8c824

Browse files
devdev
dev
authored and
dev
committed
Code styles fixes
1 parent 0bb1e59 commit ba8c824

File tree

120 files changed

+569
-627
lines changed

Some content is hidden

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

120 files changed

+569
-627
lines changed

Api/CategoryManagementInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
interface CategoryManagementInterface extends ManagementInterface
1212
{
1313

14-
}
14+
}

Api/ManagementInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ public function get($id);
5656
* @return bool.
5757
*/
5858
public function view($id, $storeId);
59-
}
59+
}

Api/PostManagementInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
interface PostManagementInterface extends ManagementInterface
1212
{
13-
/**
13+
/**
1414
* Retrieve list of post by page type, term, store, etc
1515
*
1616
* @param string $type
@@ -21,4 +21,4 @@ interface PostManagementInterface extends ManagementInterface
2121
* @return bool
2222
*/
2323
public function getList($type, $term, $storeId, $page, $limit);
24-
}
24+
}

App/Action/Action.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ protected function _forwardNoroute()
4848
{
4949
$this->_forward('index', 'noroute', 'cms');
5050
}
51-
5251
}

Block/Adminhtml/Grid/Column/Render/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Category extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra
2020

2121
/**
2222
* @var array
23-
*/
23+
*/
2424
static protected $categories = [];
2525

2626
/**

Block/Adminhtml/Grid/Column/Statuses.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\Grid\Column;
1010

1111
/**
12-
* Admin blog grid statuses
12+
* Admin blog grid statuses
1313
*/
1414
class Statuses extends \Magento\Backend\Block\Widget\Grid\Column
1515
{

Block/Adminhtml/Import/Wordpress.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ protected function _construct()
3333
if (!$this->_isAllowedAction('Magefan_Blog::import')) {
3434
$this->buttonList->remove('save');
3535
} else {
36-
$this->updateButton(
37-
'save', 'label', __('Start Import')
38-
);
36+
$this->updateButton(
37+
'save',
38+
'label',
39+
__('Start Import')
40+
);
3941
}
4042

4143
$this->buttonList->remove('delete');
@@ -62,5 +64,4 @@ public function getSaveUrl()
6264
{
6365
return $this->getUrl('*/*/run', ['_current' => true]);
6466
}
65-
6667
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public function getElementHtml()
9090
*/
9191
public function getImages()
9292
{
93-
$result = array();
93+
$result = [];
9494
$gallery = $this->registry->registry('current_model')->getGalleryImages();
9595

9696
if (count($gallery)) {
97-
$result['images'] = array();
97+
$result['images'] = [];
9898
$position = 1;
9999
foreach ($gallery as $image) {
100100
$result['images'][] = [

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
4848

4949
return $html;
5050
}
51-
5251
}

Block/Amp/Ldjson/PostList.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
* Blog post list ldJson block
1313
*/
1414
if (class_exists('\Plumrocket\Amp\Block\Page\Head\Ldjson\Cms')) {
15-
class PostListIntermediate extends \Plumrocket\Amp\Block\Page\Head\Ldjson\Cms {}
15+
class PostListIntermediate extends \Plumrocket\Amp\Block\Page\Head\Ldjson\Cms
16+
{
17+
}
1618
} else {
17-
class PostListIntermediate extends \Magento\Framework\View\Element\AbstractBlock {}
19+
class PostListIntermediate extends \Magento\Framework\View\Element\AbstractBlock
20+
{
21+
}
1822
}
1923

2024
class PostList extends PostListIntermediate

Block/Amp/Og/Post.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
*/
1515

1616
if (class_exists('\Plumrocket\Amp\Block\Page\Head\Og\AbstractOg')) {
17-
class PostIntermediate extends \Plumrocket\Amp\Block\Page\Head\Og\AbstractOg {}
17+
class PostIntermediate extends \Plumrocket\Amp\Block\Page\Head\Og\AbstractOg
18+
{
19+
}
1820
} else {
19-
class PostIntermediate extends \Magento\Framework\View\Element\AbstractBlock {}
21+
class PostIntermediate extends \Magento\Framework\View\Element\AbstractBlock
22+
{
23+
}
2024
}
2125

2226
class Post extends PostIntermediate
@@ -64,7 +68,5 @@ public function getImage()
6468
if ($image) {
6569
return $this->stripTags($image);
6670
}
67-
6871
}
69-
7072
}

Block/Archive/PostList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ protected function _getTitle()
7878
$time = strtotime($this->getYear().'-'.$this->getMonth().'-01');
7979
return sprintf(
8080
__('Monthly Archives: %s %s'),
81-
__(date('F', $time)), date('Y', $time)
81+
__(date('F', $time)),
82+
date('Y', $time)
8283
);
8384
}
84-
8585
}

Block/Author/PostList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,4 @@ protected function _prepareLayout()
5959

6060
return parent::_prepareLayout();
6161
}
62-
6362
}

Block/Catalog/Product/RelatedPosts.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function displayPosts()
6666
public function getProduct()
6767
{
6868
if (!$this->hasData('product')) {
69-
$this->setData('product',
69+
$this->setData(
70+
'product',
7071
$this->_coreRegistry->registry('current_product')
7172
);
7273
}

Block/Category/Info.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ public function getContent()
7878
}
7979
return $category->getData($key);
8080
}
81-
8281
}

Block/Category/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function _addBreadcrumbs($title = null, $key = null)
9797
}
9898

9999
$category = $this->getCategory();
100-
$breadcrumbsBlock->addCrumb('blog_category',[
100+
$breadcrumbsBlock->addCrumb('blog_category', [
101101
'label' => $category->getTitle(),
102102
'title' => $category->getTitle()
103103
]);

Block/Index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,4 @@ protected function _addBreadcrumbs($title = null, $key = null)
105105
);
106106
}
107107
}
108-
109108
}

Block/Infortis/UltraMegamenu/Topmenu.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public function __construct(
3333
) {
3434
$this->menuHelper = $menuHelper;
3535
parent::__construct($context, $data);
36-
3736
}
3837

3938
/**
@@ -47,9 +46,9 @@ protected function _toHtml()
4746

4847
$html = '';
4948
if ($blogNode) {
50-
5149
$max_level = $this->_scopeConfig->getValue(
52-
Config::XML_PATH_TOP_MENU_MAX_DEPTH, \Magento\Store\Model\ScopeInterface::SCOPE_STORE
50+
Config::XML_PATH_TOP_MENU_MAX_DEPTH,
51+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
5352
);
5453

5554
$children = $blogNode->getChildren();
@@ -60,9 +59,9 @@ protected function _toHtml()
6059
<li class="nav-item level0 level-top classic ' . ($active ? 'active' : '') . ' ' . ($hasChildren ? 'parent nav-item--only-subcategories' : '') . ' ">
6160
<a class="level-top" href="' . $blogNode->getUrl() . '" title="' . $this->escapeHtml($blogNode->getName()) . '">
6261
<span>' . $this->escapeHtml($blogNode->getName()) . '</span>';
63-
if ($hasChildren) {
64-
$html .= '<span class="caret"></span>';
65-
}
62+
if ($hasChildren) {
63+
$html .= '<span class="caret"></span>';
64+
}
6665
$html .= '</a>';
6766
if ($hasChildren) {
6867
$html .= '<span class="opener"></span>';
@@ -84,19 +83,17 @@ public function getSubmenuItemsHtml($children, $level = 1, $max_level = 0)
8483
$html = '';
8584

8685
if (!$max_level || $max_level >= $level) {
87-
8886
$html .= '<ul class="level0 nav-submenu nav-panel--dropdown nav-panel">';
8987
foreach ($children as $child) {
9088
$subChildren = $child->getChildren();
9189
$html .= '<li class="nav-item level' . $level . ' classic">
9290
<a href="' . $child->getUrl() . '"><span>' . $this->escapeHtml($child->getName()) . '</span></a>
93-
' . (count($subChildren) > 0 ? $this->getSubmenuItemsHtml($subChildren, $level+1, $max_level ) : '') . '
91+
' . (count($subChildren) > 0 ? $this->getSubmenuItemsHtml($subChildren, $level+1, $max_level) : '') . '
9492
</li>';
9593
}
9694
$html .= '</ul>';
9795
}
9896

9997
return $html;
10098
}
101-
10299
}

Block/Post/AbstractPost.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public function __construct(
8585
public function getPost()
8686
{
8787
if (!$this->hasData('post')) {
88-
$this->setData('post',
88+
$this->setData(
89+
'post',
8990
$this->_coreRegistry->registry('current_blog_post')
9091
);
9192
}
@@ -145,5 +146,4 @@ public function getInfoBlock()
145146

146147
return $this->getData($k)->setPost($this->getPost());
147148
}
148-
149149
}

Block/Post/Info.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,4 @@ public function magefanCommentsEnabled()
6767
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
6868
) == \Magefan\Blog\Model\Config\Source\CommetType::MAGEFAN;
6969
}
70-
7170
}

Block/Post/PostList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,4 @@ protected function getBreadcrumbsBlock()
147147

148148
return false;
149149
}
150-
151150
}

Block/Post/PostList/Toolbar.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getCollection()
7272
public function getLimit()
7373
{
7474
return $this->_scopeConfig->getValue(
75-
'mfblog/post_list/posts_per_page',
75+
'mfblog/post_list/posts_per_page',
7676
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
7777
);
7878
}
@@ -127,5 +127,4 @@ public function getPagerHtml()
127127

128128
return '';
129129
}
130-
131130
}

Block/Post/View.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function _addBreadcrumbs($title = null, $key = null)
8686

8787
$parentCategories = [];
8888
$parentCategory = $this->getPost()->getParentCategory();
89-
while ($parentCategory ) {
89+
while ($parentCategory) {
9090
$parentCategories[] = $parentCategory;
9191
$parentCategory = $parentCategory->getParentCategory();
9292
}
@@ -106,5 +106,4 @@ protected function _addBreadcrumbs($title = null, $key = null)
106106
]);
107107
}
108108
}
109-
110109
}

Block/Post/View/Comments.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public function __construct(
6161
public function getCommentsType()
6262
{
6363
return $this->_scopeConfig->getValue(
64-
'mfblog/post_view/comments/type', ScopeInterface::SCOPE_STORE
64+
'mfblog/post_view/comments/type',
65+
ScopeInterface::SCOPE_STORE
6566
);
6667
}
6768

@@ -72,7 +73,8 @@ public function getCommentsType()
7273
public function getNumberOfComments()
7374
{
7475
return (int)$this->_scopeConfig->getValue(
75-
'mfblog/post_view/comments/number_of_comments', ScopeInterface::SCOPE_STORE
76+
'mfblog/post_view/comments/number_of_comments',
77+
ScopeInterface::SCOPE_STORE
7678
);
7779
}
7880

@@ -83,7 +85,8 @@ public function getNumberOfComments()
8385
public function getFacebookAppId()
8486
{
8587
return $this->_scopeConfig->getValue(
86-
'mfblog/post_view/comments/fb_app_id', ScopeInterface::SCOPE_STORE
88+
'mfblog/post_view/comments/fb_app_id',
89+
ScopeInterface::SCOPE_STORE
8790
);
8891
}
8992

@@ -94,7 +97,8 @@ public function getFacebookAppId()
9497
public function getDisqusShortname()
9598
{
9699
return $this->_scopeConfig->getValue(
97-
'mfblog/post_view/comments/disqus_forum_shortname', ScopeInterface::SCOPE_STORE
100+
'mfblog/post_view/comments/disqus_forum_shortname',
101+
ScopeInterface::SCOPE_STORE
98102
);
99103
}
100104

@@ -115,7 +119,8 @@ public function getLocaleCode()
115119
public function getPost()
116120
{
117121
if (!$this->hasData('post')) {
118-
$this->setData('post',
122+
$this->setData(
123+
'post',
119124
$this->_coreRegistry->registry('current_blog_post')
120125
);
121126
}

Block/Post/View/Comments/Magefan.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function __construct(
7070
*/
7171
public function getCommentBlock()
7272
{
73-
$k = 'comment_block';
73+
$k = 'comment_block';
7474
if (!$this->hasData($k)) {
7575
$blockName = $this->getCommentBlockName();
7676
if ($blockName) {
@@ -94,9 +94,9 @@ public function getCommentBlock()
9494
*/
9595
public function getCommentHtml(\Magefan\Blog\Model\Comment $comment)
9696
{
97-
return $this->getCommentBlock()
98-
->setComment($comment)
99-
->toHtml();
97+
return $this->getCommentBlock()
98+
->setComment($comment)
99+
->toHtml();
100100
}
101101

102102
/**
@@ -108,9 +108,9 @@ protected function prepareCommentCollection()
108108
{
109109

110110
$this->commentCollection = $this->getPost()->getComments()
111-
->addActiveFilter()
111+
->addActiveFilter()
112112
->addFieldToFilter('parent_id', 0)
113-
/*->setPageSize($this->getNumberOfComments())*/
113+
/*->setPageSize($this->getNumberOfComments())*/
114114
->setOrder('creation_time', 'DESC');
115115
}
116116

@@ -180,5 +180,4 @@ public function getFormUrl()
180180
{
181181
return $this->getUrl('blog/comment/post');
182182
}
183-
184183
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,4 @@ public function getNumberOfReplies()
6464
ScopeInterface::SCOPE_STORE
6565
);
6666
}
67-
6867
}

0 commit comments

Comments
 (0)