Skip to content

Commit 020fb1e

Browse files
committed
magento#34505: fix failed static tests
1 parent 53f188b commit 020fb1e

File tree

6 files changed

+48
-52
lines changed

6 files changed

+48
-52
lines changed

app/code/Magento/Backend/App/DefaultPath.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22
/**
3-
* Default application path for backend area
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
86
namespace Magento\Backend\App;
97

108
/**
9+
* Default application path for backend area
10+
*
1111
* @api
1212
* @since 100.0.2
1313
*/

lib/internal/Magento/Framework/DB/Ddl/Table.php

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,129 +18,129 @@ class Table
1818
/**
1919
* Types of columns
2020
*/
21-
const TYPE_BOOLEAN = 'boolean';
21+
public const TYPE_BOOLEAN = 'boolean';
2222

23-
const TYPE_SMALLINT = 'smallint';
23+
public const TYPE_SMALLINT = 'smallint';
2424

25-
const TYPE_INTEGER = 'integer';
25+
public const TYPE_INTEGER = 'integer';
2626

27-
const TYPE_BIGINT = 'bigint';
27+
public const TYPE_BIGINT = 'bigint';
2828

29-
const TYPE_FLOAT = 'float';
29+
public const TYPE_FLOAT = 'float';
3030

31-
const TYPE_NUMERIC = 'numeric';
31+
public const TYPE_NUMERIC = 'numeric';
3232

33-
const TYPE_DECIMAL = 'decimal';
33+
public const TYPE_DECIMAL = 'decimal';
3434

35-
const TYPE_DATE = 'date';
35+
public const TYPE_DATE = 'date';
3636

37-
const TYPE_TIMESTAMP = 'timestamp';
37+
public const TYPE_TIMESTAMP = 'timestamp';
3838

3939
// Capable to support date-time from 1970 + auto-triggers in some RDBMS
40-
const TYPE_DATETIME = 'datetime';
40+
public const TYPE_DATETIME = 'datetime';
4141

4242
// Capable to support long date-time before 1970
43-
const TYPE_TEXT = 'text';
43+
public const TYPE_TEXT = 'text';
4444

4545
// A real blob, stored as binary inside DB
46-
const TYPE_BLOB = 'blob';
46+
public const TYPE_BLOB = 'blob';
4747

4848
// Used for back compatibility, when query param can't use statement options
49-
const TYPE_VARBINARY = 'varbinary';
49+
public const TYPE_VARBINARY = 'varbinary';
5050

5151
/**
5252
* Default and maximal TEXT and BLOB columns sizes we can support for different DB systems.
5353
*/
54-
const DEFAULT_TEXT_SIZE = 1024;
54+
public const DEFAULT_TEXT_SIZE = 1024;
5555

56-
const MAX_TEXT_SIZE = 2147483648;
56+
public const MAX_TEXT_SIZE = 2147483648;
5757

58-
const MAX_VARBINARY_SIZE = 2147483648;
58+
public const MAX_VARBINARY_SIZE = 2147483648;
5959

6060
/**
6161
* Default values for timestamps - fill with current timestamp on inserting record, on changing and both cases
6262
*/
63-
const TIMESTAMP_INIT_UPDATE = 'TIMESTAMP_INIT_UPDATE';
63+
public const TIMESTAMP_INIT_UPDATE = 'TIMESTAMP_INIT_UPDATE';
6464

65-
const TIMESTAMP_INIT = 'TIMESTAMP_INIT';
65+
public const TIMESTAMP_INIT = 'TIMESTAMP_INIT';
6666

67-
const TIMESTAMP_UPDATE = 'TIMESTAMP_UPDATE';
67+
public const TIMESTAMP_UPDATE = 'TIMESTAMP_UPDATE';
6868

6969
/**
7070
* Actions used for foreign keys
7171
*/
72-
const ACTION_CASCADE = 'CASCADE';
72+
public const ACTION_CASCADE = 'CASCADE';
7373

74-
const ACTION_SET_NULL = 'SET NULL';
74+
public const ACTION_SET_NULL = 'SET NULL';
7575

76-
const ACTION_NO_ACTION = 'NO ACTION';
76+
public const ACTION_NO_ACTION = 'NO ACTION';
7777

78-
const ACTION_RESTRICT = 'RESTRICT';
78+
public const ACTION_RESTRICT = 'RESTRICT';
7979

80-
const ACTION_SET_DEFAULT = 'SET DEFAULT';
80+
public const ACTION_SET_DEFAULT = 'SET DEFAULT';
8181

8282
/**
8383
* Column option 'default'
8484
*
8585
* @var string
8686
*/
87-
const OPTION_DEFAULT = 'default';
87+
public const OPTION_DEFAULT = 'default';
8888

8989
/**
9090
* Column option 'identity'
9191
*
9292
* @var string
9393
*/
94-
const OPTION_IDENTITY = 'identity';
94+
public const OPTION_IDENTITY = 'identity';
9595

9696
/**
9797
* Column option 'length'
9898
*
9999
* @var string
100100
*/
101-
const OPTION_LENGTH = 'length';
101+
public const OPTION_LENGTH = 'length';
102102

103103
/**
104104
* Column option 'nullable'
105105
*
106106
* @var string
107107
*/
108-
const OPTION_NULLABLE = 'nullable';
108+
public const OPTION_NULLABLE = 'nullable';
109109

110110
/**
111111
* Column option 'precision'
112112
*
113113
* @var string
114114
*/
115-
const OPTION_PRECISION = 'precision';
115+
public const OPTION_PRECISION = 'precision';
116116

117117
/**
118118
* Column option 'primary'
119119
*
120120
* @var string
121121
*/
122-
const OPTION_PRIMARY = 'primary';
122+
public const OPTION_PRIMARY = 'primary';
123123

124124
/**
125125
* Column option 'scale'
126126
*
127127
* @var string
128128
*/
129-
const OPTION_SCALE = 'scale';
129+
public const OPTION_SCALE = 'scale';
130130

131131
/**
132132
* Column option 'type'
133133
*
134134
* @var string
135135
*/
136-
const OPTION_TYPE = 'type';
136+
public const OPTION_TYPE = 'type';
137137

138138
/**
139139
* Column option 'unsigned'
140140
*
141141
* @var string
142142
*/
143-
const OPTION_UNSIGNED = 'unsigned';
143+
public const OPTION_UNSIGNED = 'unsigned';
144144

145145
/**
146146
* Name of table
@@ -150,8 +150,6 @@ class Table
150150
protected $_tableName;
151151

152152
/**
153-
* Schema name
154-
*
155153
* @var string
156154
*/
157155
protected $_schemaName;
@@ -637,6 +635,7 @@ public function setOption($key, $value)
637635

638636
/**
639637
* Retrieve table option value by option name
638+
*
640639
* Return null if option does not exits
641640
*
642641
* @param string $key
@@ -673,7 +672,7 @@ protected function _sortIndexColumnPosition($a, $b)
673672
}
674673

675674
/**
676-
* table column position comparison function
675+
* Table column position comparison function
677676
*
678677
* @param array $a
679678
* @param array $b

lib/internal/Magento/Framework/Filesystem/Driver/File.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Origin filesystem driver
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
@@ -38,7 +36,7 @@ class File implements DriverInterface
3836
*/
3937
public function __construct(bool $stateful = false)
4038
{
41-
$this->stateful = $stateful ?? false;
39+
$this->stateful = $stateful;
4240
}
4341

4442
/**

lib/internal/Magento/Framework/Stdlib/DateTime.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ class DateTime
1717
/**#@+
1818
* Date format, used as default. Compatible with \DateTime
1919
*/
20-
const DATETIME_INTERNAL_FORMAT = 'yyyy-MM-dd HH:mm:ss';
20+
public const DATETIME_INTERNAL_FORMAT = 'yyyy-MM-dd HH:mm:ss';
2121

22-
const DATE_INTERNAL_FORMAT = 'yyyy-MM-dd';
22+
public const DATE_INTERNAL_FORMAT = 'yyyy-MM-dd';
2323

24-
const DATETIME_PHP_FORMAT = 'Y-m-d H:i:s';
24+
public const DATETIME_PHP_FORMAT = 'Y-m-d H:i:s';
2525

26-
const DATE_PHP_FORMAT = 'Y-m-d';
26+
public const DATE_PHP_FORMAT = 'Y-m-d';
2727

2828
/**#@-*/
2929

3030
/**
3131
* Minimum allowed year value
3232
*/
33-
const YEAR_MIN_VALUE = -10000;
33+
public const YEAR_MIN_VALUE = -10000;
3434

3535
/**
3636
* Maximum allowed year value
3737
*/
38-
const YEAR_MAX_VALUE = 10000;
38+
public const YEAR_MAX_VALUE = 10000;
3939

4040
/**
4141
* Format date to internal format

lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ public function formatDateTime(
307307
}
308308

309309
$formatter = $this->dateFormatterFactory->create(
310-
(string)($locale ?: $this->_localeResolver->getLocale()),
311-
(int)($dateType ?? \IntlDateFormatter::SHORT),
312-
(int)($timeType ?? \IntlDateFormatter::SHORT),
310+
(string) ($locale ?: $this->_localeResolver->getLocale()),
311+
(int) $dateType,
312+
(int) $timeType,
313313
null,
314314
false
315315
);

lib/internal/Magento/Framework/Url.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ public function getBaseUrl($params = [])
496496
* @param string $data
497497
* @return \Magento\Framework\UrlInterface
498498
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
499+
* @SuppressWarnings(PHPMD.NPathComplexity)
499500
*/
500501
protected function _setRoutePath($data)
501502
{
@@ -924,9 +925,7 @@ private function createUrl($routePath = null, array $routeParams = null)
924925
unset($routeParams['_query']);
925926
}
926927

927-
$noSid = null;
928928
if (isset($routeParams['_nosid'])) {
929-
$noSid = (bool)$routeParams['_nosid'];
930929
unset($routeParams['_nosid']);
931930
}
932931
$url = $this->getRouteUrl($routePath, $routeParams);

0 commit comments

Comments
 (0)