Skip to content

Commit d174293

Browse files
committed
AC-13306::Adobe Commerce 2.4.8 core code is compatible with PHP 8.4
1 parent 624f7a1 commit d174293

File tree

17 files changed

+29
-29
lines changed

17 files changed

+29
-29
lines changed

app/code/Magento/PageBuilder/Block/Adminhtml/Stage/Render.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(
5656
Config $config,
5757
Json $json,
5858
array $data = [],
59-
Minification $minification = null
59+
?Minification $minification = null
6060
) {
6161
parent::__construct($context, $data);
6262
$this->fileManager = $fileManager;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(
4949
Context $context,
5050
ConfigInterface $config,
5151
array $data = [],
52-
FrontendInterface $cache = null,
52+
?FrontendInterface $cache = null,
5353
?RandomKey $sessionRandomKey = null
5454
) {
5555
$this->config = $config;

app/code/Magento/PageBuilder/Component/Form/Element/Wysiwyg.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public function __construct(
7070
array $components = [],
7171
array $data = [],
7272
array $config = [],
73-
PageBuilderConfig $pageBuilderConfig = null,
73+
?PageBuilderConfig $pageBuilderConfig = null,
7474
bool $overrideSnapshot = false,
75-
Repository $assetRepo = null,
76-
AuthorizationInterface $authorization = null
75+
?Repository $assetRepo = null,
76+
?AuthorizationInterface $authorization = null
7777
) {
7878
$this->assetRepo = $assetRepo ?: ObjectManager::getInstance()->get(Repository::class);
7979
$this->authorization = $authorization ?: ObjectManager::getInstance()->get(AuthorizationInterface::class);

app/code/Magento/PageBuilder/Component/Form/HtmlCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function __construct(
6363
BackendUrlInterface $backendUrl,
6464
Images $imagesHelper,
6565
VariableConfig $variableConfig,
66-
OpenDialogUrl $openDialogUrl = null,
66+
?OpenDialogUrl $openDialogUrl = null,
6767
$currentTreePath = 'wysiwyg',
6868
$components = [],
6969
array $data = []

app/code/Magento/PageBuilder/Controller/Adminhtml/ContentType/Image/Upload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
\Magento\Framework\File\UploaderFactory $uploaderFactory,
7272
\Magento\Framework\Filesystem\DirectoryList $directoryList,
7373
\Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages,
74-
Filesystem $filesystem = null
74+
?Filesystem $filesystem = null
7575
) {
7676
parent::__construct($context);
7777
$this->resultJsonFactory = $resultJsonFactory;

app/code/Magento/PageBuilder/Controller/ContentType/Preview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Preview extends \Magento\Framework\App\Action\Action implements HttpPostAc
4343
public function __construct(
4444
\Magento\Backend\App\Action\Context $context,
4545
\Magento\PageBuilder\Model\Stage\RendererPool $rendererPool,
46-
\Magento\Backend\Model\Auth $auth = null
46+
?\Magento\Backend\Model\Auth $auth = null
4747
) {
4848
parent::__construct($context);
4949

app/code/Magento/PageBuilder/Model/Catalog/Sorting/SimpleOption.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class SimpleOption implements OptionInterface
4343
*/
4444
public function __construct(
4545
string $label,
46-
string $sortDirection = null,
47-
string $attributeField = null,
48-
string $secondarySortDirection = null
46+
?string $sortDirection = null,
47+
?string $attributeField = null,
48+
?string $secondarySortDirection = null
4949
) {
5050
$this->label = $label;
5151
$this->sortDirection = $sortDirection;

app/code/Magento/PageBuilder/Model/Dom/Adapter/DocumentInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function createDocumentFragment(): DocumentFragmentInterface;
3838
* @param string $value [optional]
3939
* @return ElementInterface
4040
*/
41-
public function createElement(string $name, string $value = null);
41+
public function createElement(string $name, ?string $value = null);
4242

4343
/**
4444
* Returns the first element matching the specified selector.
@@ -62,7 +62,7 @@ public function querySelectorAll(string $selector): HtmlCollectionInterface;
6262
* @param DOMNode|null $node
6363
* @return string
6464
*/
65-
public function saveHTML(DOMNode $node = null): string;
65+
public function saveHTML(?DOMNode $node = null): string;
6666

6767
/**
6868
* Closes the stream and any underlying resources.

app/code/Magento/PageBuilder/Model/Dom/Document.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function createDocumentFragment(): DocumentFragmentInterface
7373
/**
7474
* @inheritDoc
7575
*/
76-
public function createElement(string $name, string $value = null): ElementInterface
76+
public function createElement(string $name, ?string $value = null): ElementInterface
7777
{
7878
return $this->objectManager->create(
7979
ElementInterface::class,
@@ -106,7 +106,7 @@ public function querySelectorAll(string $selector): HtmlCollectionInterface
106106
/**
107107
* @inheritDoc
108108
*/
109-
public function saveHTML(DOMNode $node = null): string
109+
public function saveHTML(?DOMNode $node = null): string
110110
{
111111
return $this->document->saveHTML($node);
112112
}

app/code/Magento/PageBuilder/Model/ResourceModel/Template/Grid/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(
6262
$resourceModel,
6363
$model = Document::class,
6464
$connection = null,
65-
AbstractDb $resource = null
65+
?AbstractDb $resource = null
6666
) {
6767
$this->resourceModel = $resourceModel;
6868
$this->model = $model;
@@ -128,7 +128,7 @@ public function getSearchCriteria()
128128
* @return $this
129129
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
130130
*/
131-
public function setSearchCriteria(SearchCriteriaInterface $searchCriteria = null)
131+
public function setSearchCriteria(?SearchCriteriaInterface $searchCriteria = null)
132132
{
133133
return $this;
134134
}
@@ -162,7 +162,7 @@ public function setTotalCount($totalCount)
162162
* @return $this
163163
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
164164
*/
165-
public function setItems(array $items = null)
165+
public function setItems(?array $items = null)
166166
{
167167
return $this;
168168
}

0 commit comments

Comments
 (0)