Skip to content

Commit 70228cd

Browse files
committed
MC-38568: Some times, media Gallery is not loaded from Page Builder
- Fix code style
1 parent 2e8a54d commit 70228cd

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

app/code/Magento/PageBuilder/Block/WysiwygSetup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class WysiwygSetup extends Template
3232
* @var FrontendInterface
3333
*/
3434
private $cache;
35+
3536
/**
3637
* @var RandomKey
3738
*/

app/code/Magento/PageBuilder/Model/Session/RandomKey.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class RandomKey
2020
/**
2121
* Default key length to generate
2222
*/
23-
const DEFAULT_KEY_LENGTH = 16;
23+
private const DEFAULT_KEY_LENGTH = 16;
2424

2525
/**
2626
* Default key name
2727
*/
28-
const DEFAULT_NAME = '_pb_config_cache_key_suffix';
28+
private const DEFAULT_NAME = '_pb_config_cache_key_suffix';
2929

3030
/**
3131
* @var Random

app/code/Magento/PageBuilder/Model/Stage/Config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class Config
119119
* @var Json
120120
*/
121121
private $serializer;
122+
122123
/**
123124
* @var RandomKey
124125
*/

app/code/Magento/PageBuilder/Plugin/ClearEditorConfigCache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class ClearEditorConfigCache
1919
* @var EditorConfigCacheCleaner
2020
*/
2121
private $cacheCleaner;
22+
2223
/**
2324
* @var UrlInterface
2425
*/
@@ -42,7 +43,7 @@ public function __construct(
4243
* @param \Magento\Backend\Model\Auth $subject
4344
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
4445
*/
45-
public function afterLogin(\Magento\Backend\Model\Auth $subject)
46+
public function afterLogin(\Magento\Backend\Model\Auth $subject): void
4647
{
4748
if ($this->backendUrl->useSecretKey()) {
4849
$this->cacheCleaner->execute();

app/code/Magento/PageBuilder/Test/Unit/Model/Session/RandomKeyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function setUp(): void
5252
* @param string $expected
5353
* @dataProvider getValueDataProvider
5454
*/
55-
public function testGetValue(string $keyName, int $keyLength, ?string $value, string $expected)
55+
public function testGetValue(string $keyName, int $keyLength, ?string $value, string $expected): void
5656
{
5757
$this->model = new RandomKey(
5858
$this->random,

app/code/Magento/PageBuilder/Test/Unit/Plugin/ClearEditorConfigCacheTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class ClearEditorConfigCacheTest extends TestCase
3333
* @var ClearEditorConfigCache
3434
*/
3535
private $model;
36+
3637
/**
3738
* @var UrlInterface|MockObject
3839
*/
@@ -59,7 +60,7 @@ protected function setUp(): void
5960
* @dataProvider afterLoginDataProvider
6061
* @param bool $isUseSecretKey
6162
*/
62-
public function testAfterLogin(bool $isUseSecretKey = false): void
63+
public function testAfterLogin(bool $isUseSecretKey): void
6364
{
6465
$this->backendUrl->expects($this->once())
6566
->method('useSecretKey')

dev/tests/integration/testsuite/Magento/PageBuilder/Model/Stage/ConfigTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function setUp(): void
4444
* @magentoConfigFixture admin/url/use_custom_path 1
4545
* @magentoConfigFixture admin/url/custom_path secret
4646
*/
47-
public function testMediaUrlShouldBeTheSameAsStorefrontMediaURL()
47+
public function testMediaUrlShouldBeTheSameAsStorefrontMediaURL(): void
4848
{
4949
$this->assertEquals('http://localhost/media/', $this->model->getConfig()['media_url']);
5050
}
@@ -54,7 +54,7 @@ public function testMediaUrlShouldBeTheSameAsStorefrontMediaURL()
5454
*
5555
* @magentoConfigFixture admin/security/use_form_key 1
5656
*/
57-
public function testConfigShouldNotBeCachedAcrossDifferentSessions()
57+
public function testConfigShouldNotBeCachedAcrossDifferentSessions(): void
5858
{
5959
$config = $this->model->getConfig();
6060
$this->startNewSession();
@@ -66,7 +66,7 @@ public function testConfigShouldNotBeCachedAcrossDifferentSessions()
6666
*
6767
* @magentoConfigFixture admin/security/use_form_key 1
6868
*/
69-
public function testConfigShouldBeCachedWithinSameSession()
69+
public function testConfigShouldBeCachedWithinSameSession(): void
7070
{
7171
$config = $this->model->getConfig();
7272
$this->assertEquals($config, $this->model->getConfig());

0 commit comments

Comments
 (0)