Skip to content

Commit bede4d1

Browse files
committed
MC-22982: Enable template filter strict mode by default
1 parent 1790ba5 commit bede4d1

File tree

2 files changed

+13
-3
lines changed
  • app/code/Magento/Customer/Block/Address/Renderer
  • dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist

2 files changed

+13
-3
lines changed

app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\Customer\Model\Address\AddressModelInterface;
99
use Magento\Customer\Model\Address\Mapper;
1010
use Magento\Customer\Model\Metadata\ElementFactory;
11+
use Magento\Directory\Model\Country\Format;
1112
use Magento\Framework\View\Element\AbstractBlock;
1213

1314
/**
@@ -91,6 +92,8 @@ public function setType(\Magento\Framework\DataObject $type)
9192
}
9293

9394
/**
95+
* Get the format of the address
96+
*
9497
* @param AddressModelInterface|null $address
9598
* @return string
9699
* All new code should use renderArray based on Metadata service
@@ -106,8 +109,11 @@ public function getFormat(AddressModelInterface $address = null)
106109
}
107110

108111
/**
109-
* {@inheritdoc}
112+
* Render address
110113
*
114+
* @param AddressModelInterface $address
115+
* @param string|null $format
116+
* @return mixed
111117
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
112118
* @SuppressWarnings(PHPMD.NPathComplexity)
113119
*/
@@ -118,7 +124,7 @@ public function render(AddressModelInterface $address, $format = null)
118124
}
119125

120126
/**
121-
* {@inheritdoc}
127+
* @inheritdoc
122128
*/
123129
public function getFormatArray($addressAttributes = null)
124130
{
@@ -133,8 +139,11 @@ public function getFormatArray($addressAttributes = null)
133139
}
134140

135141
/**
136-
* {@inheritdoc}
142+
* Render address by attribute array
137143
*
144+
* @param array $addressAttributes
145+
* @param Format|null $format
146+
* @return string
138147
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
139148
* @SuppressWarnings(PHPMD.NPathComplexity)
140149
*/

dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/blacklist/common.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php
77
lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php
88
dev/tests/integration/framework/deployTestModules.php
9+
dev/tests/integration/testsuite/Magento/Framework/Filter/DirectiveProcessor/SimpleDirectiveTest.php
910
dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php
1011
dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
1112
dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractFiltersTest.php

0 commit comments

Comments
 (0)