Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1295 add array as type in DataModel properties #2488

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
### Added

- Clear notifications for the process status of URN generation [#2486](https://github.com/magento/magento2-phpstorm-plugin/pull/2486)
- Added array as a type in Data Model properties [#2488](https://github.com/magento/magento2-phpstorm-plugin/pull/2488)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public enum PropertiesTypes {
INT("int"),
FLOAT("float"),
STRING("string"),
BOOL("bool");
BOOL("bool"),
ARRAY("array");

private final String propertyType;

Expand Down Expand Up @@ -66,7 +67,8 @@ public static String[] getPropertyTypes() {
valueOf(INT.toString()).getPropertyType(),
valueOf(FLOAT.toString()).getPropertyType(),
valueOf(STRING.toString()).getPropertyType(),
valueOf(BOOL.toString()).getPropertyType()
valueOf(BOOL.toString()).getPropertyType(),
valueOf(ARRAY.toString()).getPropertyType()
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
*/
public function get$propertyUpperCamel(): ?$propertyType
{
#if($propertyType == 'string')
#if($propertyType == 'string' || $propertyType == 'array')
return $this->getData(self::$propertyUpperSnake);
#{else}
return $this->getData(self::$propertyUpperSnake) === null ? null
Expand Down
Loading