Skip to content

Commit 4149122

Browse files
committed
Formatting changes
1 parent a49d1f9 commit 4149122

35 files changed

+250
-218
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
2+
name: Bug report about: Create a report to help us improve title: ''
53
labels: ''
64
assignees: ''
75

@@ -12,6 +10,7 @@ A clear and concise description of what the bug is.
1210

1311
**To Reproduce**
1412
Steps to reproduce the behavior:
13+
1514
1. Go to '...'
1615
2. Click on '....'
1716
3. Scroll down to '....'
@@ -24,15 +23,17 @@ A clear and concise description of what you expected to happen.
2423
If applicable, add screenshots to help explain your problem.
2524

2625
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
26+
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
3030

3131
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
32+
33+
- Device: [e.g. iPhone6]
34+
- OS: [e.g. iOS8.1]
35+
- Browser [e.g. stock browser, safari]
36+
- Version [e.g. 22]
3637

3738
**Additional context**
3839
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
2+
name: Feature request about: Suggest an idea for this project title: ''
53
labels: ''
64
assignees: ''
75

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ addons:
55
packages:
66
- mysql-server
77
- mysql-client
8-
- rabbitmq-server
8+
- rabbitmq-server
99
services:
1010
- mysql
1111
- rabbitmq
@@ -18,8 +18,8 @@ php:
1818

1919
env:
2020
matrix:
21-
- MAGENTO_VERSION=2.3
22-
- MAGENTO_VERSION=2.4
21+
- MAGENTO_VERSION=2.3
22+
- MAGENTO_VERSION=2.4
2323

2424
matrix:
2525
exclude:

Block/Adminhtml/Block/Edit/SaveButton.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ public function getButtonData()
5555
'params' => [
5656
true,
5757
[
58-
'back' => 'continue'
59-
]
60-
]
61-
]
62-
]
63-
]
64-
]
58+
'back' => 'continue',
59+
],
60+
],
61+
],
62+
],
63+
],
64+
],
6565
],
6666
'class_name' => Container::SPLIT_BUTTON,
6767
'options' => $this->getOptions(),
@@ -89,14 +89,14 @@ private function getOptions()
8989
'params' => [
9090
true,
9191
[
92-
'back' => 'duplicate'
93-
]
94-
]
95-
]
96-
]
97-
]
98-
]
99-
]
92+
'back' => 'duplicate',
93+
],
94+
],
95+
],
96+
],
97+
],
98+
],
99+
],
100100
],
101101
[
102102
'id_hard' => 'save_and_close',
@@ -111,15 +111,15 @@ private function getOptions()
111111
'params' => [
112112
true,
113113
[
114-
'back' => 'close'
115-
]
116-
]
117-
]
118-
]
119-
]
120-
]
121-
]
122-
]
114+
'back' => 'close',
115+
],
116+
],
117+
],
118+
],
119+
],
120+
],
121+
],
122+
],
123123
];
124124

125125
if ($this->hasDefaultConfiguration->get((int)$this->getBlockId())) {
@@ -136,13 +136,13 @@ private function getOptions()
136136
'params' => [
137137
true,
138138
[
139-
'back' => 'applyDefault'
140-
]
141-
]
142-
]
143-
]
144-
]
145-
]
139+
'back' => 'applyDefault',
140+
],
141+
],
142+
],
143+
],
144+
],
145+
],
146146
]]]);
147147
}
148148

Block/Adminhtml/Page/Edit/SaveButton.php

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
7+
78
namespace Firegento\ContentProvisioning\Block\Adminhtml\Page\Edit;
89

910
use Firegento\ContentProvisioning\Model\Query\HasDefaultPageConfiguration;
@@ -54,13 +55,13 @@ public function getButtonData()
5455
'params' => [
5556
true,
5657
[
57-
'back' => 'continue'
58-
]
59-
]
60-
]
61-
]
62-
]
63-
]
58+
'back' => 'continue',
59+
],
60+
],
61+
],
62+
],
63+
],
64+
],
6465
],
6566
'class_name' => Container::SPLIT_BUTTON,
6667
'options' => $this->getOptions(),
@@ -88,14 +89,14 @@ private function getOptions()
8889
'params' => [
8990
true,
9091
[
91-
'back' => 'duplicate'
92-
]
93-
]
94-
]
95-
]
96-
]
97-
]
98-
]
92+
'back' => 'duplicate',
93+
],
94+
],
95+
],
96+
],
97+
],
98+
],
99+
],
99100
],
100101
[
101102
'id_hard' => 'save_and_close',
@@ -110,15 +111,15 @@ private function getOptions()
110111
'params' => [
111112
true,
112113
[
113-
'back' => 'close'
114-
]
115-
]
116-
]
117-
]
118-
]
119-
]
120-
]
121-
]
114+
'back' => 'close',
115+
],
116+
],
117+
],
118+
],
119+
],
120+
],
121+
],
122+
],
122123
];
123124

124125
if ($this->hasDefaultConfiguration->get((int)$this->getPageId())) {
@@ -135,13 +136,13 @@ private function getOptions()
135136
'params' => [
136137
true,
137138
[
138-
'back' => 'applyDefault'
139-
]
140-
]
141-
]
142-
]
143-
]
144-
]
139+
'back' => 'applyDefault',
140+
],
141+
],
142+
],
143+
],
144+
],
145+
],
145146
]]]);
146147
}
147148

CHANGELOG.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,56 @@
11
# CHANGELOG
22

33
## 1.2.2 / 1.2.3
4+
45
* *Bugfix:* `composer.json` blocked installation of the module in Magento 2.2
5-
** Change `composer.json` dependency definition
6-
** Remove some type and return type hints in order to support Magento's code generation in older versions
6+
** Change `composer.json` dependency definition
7+
** Remove some type and return type hints in order to support Magento's code generation in older versions
78

89
## 1.2.1
10+
911
* *Improvement:* Better extensibility for fetching media files from content (PR from @roma-glushko)
1012

1113
## 1.2.0
14+
1215
* *Feature:* Enables module to provide media files
13-
** Introduce optional XML node for pages and blocks: `media_directory`
14-
** Media files, which are used in the content will be copied to Magento's `pub/media` directory if they are
15-
present in the defined source media directory
16+
** Introduce optional XML node for pages and blocks: `media_directory`
17+
** Media files, which are used in the content will be copied to Magento's `pub/media` directory if they are present in
18+
the defined source media directory
1619

1720
## 1.1.1
21+
1822
* *Bugfix:* In some cases `bin/magento` execution was not able at all during the initial Magento install
1923

2024
## 1.1.0
25+
2126
* *Feature:* Introduce further interfaces and refactor config reader structure, in order to improve extensibility
2227

2328
## 1.0.4
29+
2430
* *Bugfix:* Backport bugfix from version 1.1.1
2531

2632
## 1.0.3
33+
2734
* *Bugfix:* Fix issue with missing `store_id` values while persisting block entries.
2835

2936
## 1.0.2
37+
3038
* *Bugfix:* Extend schema in order to allow `.` for `key` like it is shown in the examples
3139

3240
## 1.0.1
41+
3342
* *Bugfix:* Add PHP 7.1 compatibility
3443

3544
## 1.0.0
45+
3646
* *Feature:* Notification in Magento backend (admin), for editors - if the content entry is maintained by code
3747
* *Improvement:* Introduce `key` attribute for configured entries, in order to improve merging of all configurations
3848
* *Refactoring:* Improve query for fetching existing cms entities by configured entries
3949

4050
## 0.1.0
51+
4152
* *Feature:* Implement initial functionality
42-
** Configuration for pages
43-
** Configuration for blocks
44-
** Recurring setup installer for pages
45-
** Recurring setup installer for blocks
53+
** Configuration for pages
54+
** Configuration for blocks
55+
** Recurring setup installer for pages
56+
** Recurring setup installer for blocks

Controller/Adminhtml/Block/Save.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
7+
78
namespace Firegento\ContentProvisioning\Controller\Adminhtml\Block;
89

910
use Firegento\ContentProvisioning\Model\Command\ApplyBlockEntry;
1011
use Firegento\ContentProvisioning\Model\Query\GetBlockEntryByBlock;
11-
use Magento\Framework\App\Action\HttpPostActionInterface;
1212
use Magento\Backend\App\Action\Context;
1313
use Magento\Cms\Api\BlockRepositoryInterface;
1414
use Magento\Cms\Model\Block;
1515
use Magento\Cms\Model\BlockFactory;
16+
use Magento\Framework\App\Action\HttpPostActionInterface;
1617
use Magento\Framework\App\Request\DataPersistorInterface;
1718
use Magento\Framework\Exception\LocalizedException;
1819
use Magento\Framework\Registry;
@@ -138,11 +139,11 @@ private function processBlockReturn($model, $data, $resultRedirect)
138139
{
139140
$redirect = $data['back'] ?? 'close';
140141

141-
if ($redirect ==='continue') {
142+
if ($redirect === 'continue') {
142143
$resultRedirect->setPath('*/*/edit', ['block_id' => $model->getId()]);
143-
} else if ($redirect === 'close') {
144+
} elseif ($redirect === 'close') {
144145
$resultRedirect->setPath('*/*/');
145-
} else if ($redirect === 'duplicate') {
146+
} elseif ($redirect === 'duplicate') {
146147
$duplicateModel = $this->blockFactory->create(['data' => $data]);
147148
$duplicateModel->setId(null);
148149
$duplicateModel->setIdentifier($data['identifier'] . '-' . uniqid());
@@ -152,7 +153,7 @@ private function processBlockReturn($model, $data, $resultRedirect)
152153
$this->messageManager->addSuccessMessage(__('You duplicated the block.'));
153154
$this->dataPersistor->set('cms_block', $data);
154155
$resultRedirect->setPath('*/*/edit', ['block_id' => $id]);
155-
} else if ($redirect === 'applyDefault') {
156+
} elseif ($redirect === 'applyDefault') {
156157
$block = $this->getBlockEntryByBlock->execute($model);
157158
$this->applyBlockEntry->execute($block);
158159
$resultRedirect->setPath('*/*/edit', ['block_id' => $model->getId()]);

0 commit comments

Comments
 (0)