Skip to content

Commit 2fa337d

Browse files
committed
AC-1989: Fix subset of deprecated php usages
- static tests fixes - rollback Media.php to avoid unit test failures
1 parent 55ba372 commit 2fa337d

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

app/code/Magento/Cron/Model/Config/Converter/Db.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function convert($source)
2929
/**
3030
* Extract and prepare cron job data
3131
*
32-
* @param array $jobs
32+
* @param array $cronTab
3333
* @return array
3434
*/
3535
protected function _extractParams(array $cronTab)

app/code/Magento/MediaStorage/App/Media.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,7 @@ private function createLocalCopy(): void
238238
*/
239239
private function checkMediaDirectoryChanged(): bool
240240
{
241-
$isDirectoryChanged = false;
242-
if ($this->mediaDirectoryPath && $this->directoryMedia->getAbsolutePath()) {
243-
$isDirectoryChanged = rtrim($this->mediaDirectoryPath, '/')
244-
!== rtrim($this->directoryMedia->getAbsolutePath(), '/');
245-
}
246-
return $isDirectoryChanged;
241+
return rtrim($this->mediaDirectoryPath, '/') !== rtrim($this->directoryMedia->getAbsolutePath(), '/');
247242
}
248243

249244
/**

app/code/Magento/Newsletter/Block/Adminhtml/Template/Edit.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
class Edit extends Widget
2222
{
2323
/**
24-
* Core registry
25-
*
2624
* @var \Magento\Framework\Registry
2725
*/
2826
protected $_coreRegistry = null;
@@ -217,6 +215,7 @@ public function getForm()
217215
public function getJsTemplateName()
218216
{
219217
$templateCode = $this->getModel()->getTemplateCode();
218+
//phpcs:ignore Magento2.Functions.DiscouragedFunction
220219
return $templateCode ? addcslashes($templateCode, "\"\r\n\\") : '';
221220
}
222221

app/code/Magento/SalesRule/Model/Quote/Discount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
class Discount extends AbstractTotal
3535
{
36-
const COLLECTOR_TYPE_CODE = 'discount';
36+
public const COLLECTOR_TYPE_CODE = 'discount';
3737

3838
/**
3939
* Discount calculation object

lib/internal/Magento/Framework/App/Utility/Files.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424
*/
2525
class Files
2626
{
27-
const INCLUDE_APP_CODE = 1;
27+
public const INCLUDE_APP_CODE = 1;
2828

29-
const INCLUDE_TESTS = 2;
29+
public const INCLUDE_TESTS = 2;
3030

31-
const INCLUDE_DEV_TOOLS = 4;
31+
public const INCLUDE_DEV_TOOLS = 4;
3232

33-
const INCLUDE_TEMPLATES = 8;
33+
public const INCLUDE_TEMPLATES = 8;
3434

35-
const INCLUDE_LIBS = 16;
35+
public const INCLUDE_LIBS = 16;
3636

37-
const INCLUDE_PUB_CODE = 32;
37+
public const INCLUDE_PUB_CODE = 32;
3838

39-
const INCLUDE_NON_CLASSES = 64;
39+
public const INCLUDE_NON_CLASSES = 64;
4040

41-
const INCLUDE_SETUP = 128;
41+
public const INCLUDE_SETUP = 128;
4242

4343
/**
4444
* Return as data set
4545
*/
46-
const AS_DATA_SET = 1024;
46+
public const AS_DATA_SET = 1024;
4747

4848
/**
4949
* @var ComponentRegistrar

0 commit comments

Comments
 (0)