Skip to content

Commit f01288a

Browse files
committed
Code style improvements
1 parent 2e4c0fb commit f01288a

File tree

15 files changed

+41
-40
lines changed

15 files changed

+41
-40
lines changed

Block/Adminhtml/AiButton.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public function __construct(
2424
Config $config,
2525
Context $context,
2626
array $data = []
27-
)
28-
{
27+
) {
2928
$this->config = $config;
3029
parent::__construct($context, $data);
3130
}
@@ -49,5 +48,4 @@ protected function _prepareLayout()
4948
}
5049
return $this;
5150
}
52-
5351
}

Block/Adminhtml/Comment/ReplyButton.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public function getButtonData()
3636
*/
3737
public function getBackUrl()
3838
{
39-
return $this->getUrl('*/*/addreply/',['id' => $this->getObjectId()]);
39+
return $this->getUrl('*/*/addreply/', ['id' => $this->getObjectId()]);
4040
}
41-
}
41+
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class Image extends AbstractRenderer
1818
public function __construct(
1919
Url $url,
2020
Context $context,
21-
array $data = [])
22-
{
21+
array $data = []
22+
) {
2323
$this->_url = $url;
2424
parent::__construct($context, $data);
2525
}
@@ -36,4 +36,4 @@ public function render(DataObject $row)
3636
}
3737
return '';
3838
}
39-
}
39+
}

Block/Adminhtml/Widget/Featured/Grid/Chooser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ protected function _toHtml() : string
183183
$buttons['open']
184184
)->setOnclick(
185185
$this->onClickJs($chooserId)
186-
/* )->setDisabled(
187-
$element->getReadonly()*/
186+
/* )->setDisabled(
187+
$element->getReadonly()*/
188188
);
189189
$chooser->setData('after_element_html', $hiddenHtml . $chooseButton->toHtml());
190190

Block/Post/View/Richsnippets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function getPublisher()
163163
protected function _toHtml()
164164
{
165165
$options = $this->getOptions();
166-
if (!$options){
166+
if (!$options) {
167167
return '';
168168
}
169169
return '<script type="application/ld+json">'

Controller/Adminhtml/Comment/AddReply.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public function __construct(
5454
Session $session,
5555
Context $context,
5656
Manager $manager,
57-
DataPersistorInterface $dataPersistor)
58-
{
57+
DataPersistorInterface $dataPersistor
58+
) {
5959
$this->comment = $comment;
6060
$this->session = $session;
6161
$this->manager = $manager;
@@ -106,5 +106,4 @@ public function execute()
106106

107107
return $resultRedirect;
108108
}
109-
110109
}

Controller/Adminhtml/CreateWithAi/Index.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,11 @@ class Index extends \Magento\Backend\App\Action
4141
* @param Config $config
4242
* @param Context $context
4343
*/
44-
public function __construct(
45-
PageFactory $resultPageFactory,
46-
Config $config,
47-
Context $context
48-
)
49-
{
44+
public function __construct(
45+
PageFactory $resultPageFactory,
46+
Config $config,
47+
Context $context
48+
) {
5049
$this->resultPageFactory = $resultPageFactory;
5150
$this->config = $config;
5251
parent::__construct($context);
@@ -77,4 +76,4 @@ public function execute()
7776
);
7877
return $pageFactory;
7978
}
80-
}
79+
}

Controller/Adminhtml/Post/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function _beforeSave($model, $request)
3535
}
3636

3737
/* Prepare empty categories and coauthors */
38-
foreach(['categories', 'coauthors'] as $key) {
38+
foreach (['categories', 'coauthors'] as $key) {
3939
if (!$request->getPost($key)) {
4040
$model->setData($key, []);
4141
}

Model/Import/AbstractImport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected function getDbAdapter()
268268
$this->dbAdapter = new \Laminas\Db\Adapter\Adapter($connectionConf);
269269

270270
try {
271-
$this->dbAdapter->query('SELECT 1')->execute();
271+
$this->dbAdapter->query('SELECT 1')->execute();
272272
} catch (\Exception $e) {
273273
throw new \Exception("Failed connect to the database.");
274274
}

Model/Import/Mageplaza.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function execute()
4141
t.meta_title as meta_title,
4242
t.meta_keywords as meta_keywords,
4343
t.meta_description as meta_description,
44-
*/
44+
*/
4545
't.description as content,
4646
t.parent_id as parent_id,
4747
t.enabled as is_active,
@@ -120,8 +120,8 @@ public function execute()
120120
t.description as content, ' .
121121
/*
122122
t.meta_title as meta_title,
123-
t.meta_description as meta_description,
124-
t.meta_keywords as meta_keywords,
123+
t.meta_description as meta_description,
124+
t.meta_keywords as meta_keywords,
125125
*/
126126
't.enabled as is_active
127127
FROM ' . $_pref . 'mageplaza_blog_tag t';

0 commit comments

Comments
 (0)