File tree Expand file tree Collapse file tree 3 files changed +65
-29
lines changed
lib/internal/Magento/Framework
Code/Test/Unit/Reader/_files Expand file tree Collapse file tree 3 files changed +65
-29
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,26 @@ class ClassWithAllArgumentTypes
4747 */
4848 protected $ _constValue ;
4949
50+ /**
51+ * Test property without specified type
52+ */
53+ private $ noType ;
54+
55+ /**
56+ * @var null
57+ */
58+ private $ optNullValue ;
59+
60+ /**
61+ * @var int|null
62+ */
63+ private ?int $ optNullIntValue ;
64+
65+ /**
66+ * @var null
67+ */
68+ private $ optNoTypeValue ;
69+
5070 /**
5171 * @param stdClass $stdClassObject
5272 * @param ClassWithoutConstruct $withoutConstructorClassObject
@@ -59,6 +79,7 @@ class ClassWithAllArgumentTypes
5979 * @param null $optNullValue
6080 * @param null|int $optNullIntValue first type from defined will be used
6181 * @param $optNoTypeValue
82+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
6283 */
6384 public function __construct (
6485 \stdClass $ stdClassObject ,
@@ -80,6 +101,10 @@ public function __construct(
80101 $ this ->_optionalStringValue = $ optionalStringValue ;
81102 $ this ->_optionalArrayValue = $ optionalArrayValue ;
82103 $ this ->_constValue = $ const ;
104+ $ this ->noType = $ noType ;
105+ $ this ->optNullValue = $ optNullValue ;
106+ $ this ->optNullIntValue = $ optNullIntValue ;
107+ $ this ->optNoTypeValue = $ optNoTypeValue ;
83108 }
84109}
85110class ClassWithoutOwnConstruct extends ClassWithAllArgumentTypes
Original file line number Diff line number Diff line change @@ -652,8 +652,12 @@ public function getDefaultFavicon()
652652 */
653653 public function getIncludes ()
654654 {
655- $ this ->includes = ($ this ->isIncludesAvailable && $ this ->includes === null ) ?
656- $ this ->scopeConfig ->getValue ('design/head/includes ' , ScopeInterface::SCOPE_STORE ) : '' ;
657- return $ this ->includes ;
655+ if ($ this ->includes === null && $ this ->isIncludesAvailable ) {
656+ $ this ->includes = $ this ->scopeConfig ->getValue (
657+ 'design/head/includes ' ,
658+ \Magento \Store \Model \ScopeInterface::SCOPE_STORE
659+ );
660+ }
661+ return $ this ->includes ??= '' ;
658662 }
659663}
You can’t perform that action at this time.
0 commit comments