File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
src/bitExpert/PHPStan/Magento/Autoload Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,6 @@ public function getFileContents(string $className): string
8989 * @see \Magento\Framework\Api\Code\Generator\ExtensionAttributesGenerator::_getClassMethods
9090 */
9191
92- // treat array types properly in the generated code. Similar to Magento core MyInterface[] type gets
93- // converted to just an array
94- $ paramType = $ type ;
95- if (strpos ($ type , '[] ' ) !== false ) {
96- $ paramType = '?array ' ;
97- }
98-
9992 $ generator ->addMethodFromGenerator (
10093 MethodGenerator::fromArray ([
10194 'name ' => 'get ' . ucfirst ($ propertyName ),
@@ -109,7 +102,7 @@ public function getFileContents(string $className): string
109102 $ generator ->addMethodFromGenerator (
110103 MethodGenerator::fromArray ([
111104 'name ' => 'set ' . ucfirst ($ propertyName ),
112- 'parameters ' => [new ParameterGenerator ( $ propertyName, $ paramType ) ],
105+ 'parameters ' => [$ propertyName ],
113106 'docblock ' => DocBlockGenerator::fromArray ([
114107 'tags ' => [
115108 new ParamTag ($ propertyName , [$ type ]),
Original file line number Diff line number Diff line change @@ -105,13 +105,6 @@ public function getFileContents(string $interfaceName): string
105105 * @see \Magento\Framework\Api\Code\Generator\ExtensionAttributesGenerator::_getClassMethods
106106 */
107107
108- // treat array types properly in the generated code. Similar to Magento core MyInterface[] type gets
109- // converted to just an array
110- $ paramType = $ type ;
111- if (strpos ($ type , '[] ' ) !== false ) {
112- $ paramType = '?array ' ;
113- }
114-
115108 $ generator ->addMethodFromGenerator (
116109 MethodGenerator::fromArray ([
117110 'name ' => 'get ' . ucfirst ($ propertyName ),
@@ -125,7 +118,7 @@ public function getFileContents(string $interfaceName): string
125118 $ generator ->addMethodFromGenerator (
126119 MethodGenerator::fromArray ([
127120 'name ' => 'set ' . ucfirst ($ propertyName ),
128- 'parameters ' => [new ParameterGenerator ( $ propertyName, $ paramType ) ],
121+ 'parameters ' => [$ propertyName ],
129122 'docblock ' => DocBlockGenerator::fromArray ([
130123 'tags ' => [
131124 new ParamTag ($ propertyName , [$ type ]),
You can’t perform that action at this time.
0 commit comments