Skip to content

Commit 3c2217f

Browse files
authored
Merge branch '3.1.0-develop' into issue-423
2 parents 9619747 + 081fc74 commit 3c2217f

File tree

4 files changed

+261
-0
lines changed

4 files changed

+261
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0).
66

77
## 3.1.0
88

9+
### Added
10+
11+
- Extended `.phpstorm.meta.php` for more convenient autocomplete
12+
913
## 3.0.4
1014

1115
### Fixed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
The data model interface indicates all the setters and getters for the related data model.
13+
This used to maintain the integrity of the data, even if there is any changes in the model you will always get consistent data.
14+
</font><br>
15+
</td>
16+
</tr>
17+
</table>
18+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
19+
<tr>
20+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
21+
</tr>
22+
<tr>
23+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
24+
<td width="10">&nbsp;</td>
25+
<td width="100%" valign="top"><font face="verdana" size="-1">A fully qualified name of the field namespace without a leading slash.
26+
</font>
27+
</td>
28+
</tr>
29+
<tr>
30+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${USE}</b></font></nobr></td>
31+
<td width="10">&nbsp;</td>
32+
<td width="100%" valign="top"><font face="verdana" size="-1">List of imports separated by comma.
33+
</font>
34+
</td>
35+
</tr>
36+
<tr>
37+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
38+
<td width="10">&nbsp;</td>
39+
<td width="100%" valign="top"><font face="verdana" size="-1">PHP Class name.
40+
</font>
41+
</td>
42+
</tr>
43+
<tr>
44+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${EXTENDS}</b></font></nobr></td>
45+
<td width="10">&nbsp;</td>
46+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class extends.
47+
</font>
48+
</td>
49+
</tr>
50+
<tr>
51+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${IMPLEMENTS}</b></font></nobr></td>
52+
<td width="10">&nbsp;</td>
53+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class implements.
54+
</font>
55+
</td>
56+
</tr>
57+
<tr>
58+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${PROPERTIES}</b></font></nobr></td>
59+
<td width="10">&nbsp;</td>
60+
<td width="100%" valign="top"><font face="verdana" size="-1">Class member variables.
61+
</font>
62+
</td>
63+
</tr>
64+
</table>
65+
</body>
66+
</html>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!--
2+
/*
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
The data model is a stateful data transfer object (DTO) that introduces simple data PHP object that contains only getters and setters.
13+
In other words, data models are interfaces that define the list of data properties other components can expect from them.
14+
</font><br>
15+
</td>
16+
</tr>
17+
<tr>
18+
<td><font face="verdana" size="-1">
19+
Link to documentation
20+
<a href="https://www.mageplaza.com/magento-2-module-development/how-to-create-crud-model-magento-2.html">
21+
DevDocs</a>.
22+
</font><br>
23+
</td>
24+
</tr>
25+
</table>
26+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
27+
<tr>
28+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
29+
</tr>
30+
<tr>
31+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAMESPACE}</b></font></nobr></td>
32+
<td width="10">&nbsp;</td>
33+
<td width="100%" valign="top"><font face="verdana" size="-1">A fully qualified name of the field namespace without a leading slash.
34+
</font>
35+
</td>
36+
</tr>
37+
<tr>
38+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${USE}</b></font></nobr></td>
39+
<td width="10">&nbsp;</td>
40+
<td width="100%" valign="top"><font face="verdana" size="-1">List of imports separated by comma.
41+
</font>
42+
</td>
43+
</tr>
44+
<tr>
45+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
46+
<td width="10">&nbsp;</td>
47+
<td width="100%" valign="top"><font face="verdana" size="-1">PHP Class name.
48+
</font>
49+
</td>
50+
</tr>
51+
<tr>
52+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${EXTENDS}</b></font></nobr></td>
53+
<td width="10">&nbsp;</td>
54+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class extends.
55+
</font>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${IMPLEMENTS}</b></font></nobr></td>
60+
<td width="10">&nbsp;</td>
61+
<td width="100%" valign="top"><font face="verdana" size="-1">Name of PHP class that the Class implements.
62+
</font>
63+
</td>
64+
</tr>
65+
<tr>
66+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${PROPERTIES}</b></font></nobr></td>
67+
<td width="10">&nbsp;</td>
68+
<td width="100%" valign="top"><font face="verdana" size="-1">Class member variables.
69+
</font>
70+
</td>
71+
</tr>
72+
</table>
73+
</body>
74+
</html>
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,123 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PHPSTORM_META {
6+
47
override(\Magento\Framework\ObjectManagerInterface::get(0), map(['' => '@']));
58
override(\Magento\Framework\ObjectManagerInterface::create(0), map(['' => '@']));
9+
10+
override(\Magento\Framework\View\LayoutInterface::createBlock(0), map(['' => '@']));
11+
override(\Magento\Framework\View\TemplateEngine\Php::helper(0), map(['' => '@']));
12+
13+
override(
14+
\Magento\Framework\Controller\ResultFactory::create(0),
15+
map(
16+
[
17+
\Magento\Framework\Controller\ResultFactory::TYPE_FORWARD => \Magento\Framework\Controller\Result\Forward::class,
18+
\Magento\Framework\Controller\ResultFactory::TYPE_JSON => \Magento\Framework\Controller\Result\Json::class,
19+
\Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT => \Magento\Framework\View\Result\Layout::class,
20+
\Magento\Framework\Controller\ResultFactory::TYPE_PAGE => \Magento\Framework\View\Result\Page::class,
21+
\Magento\Framework\Controller\ResultFactory::TYPE_RAW => \Magento\Framework\Controller\Result\Raw::class,
22+
\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT => \Magento\Framework\Controller\Result\Redirect::class,
23+
]
24+
)
25+
);
26+
27+
expectedArguments(
28+
\Magento\Framework\Controller\ResultFactory::create(),
29+
0,
30+
\Magento\Framework\Controller\ResultFactory::TYPE_FORWARD,
31+
\Magento\Framework\Controller\ResultFactory::TYPE_JSON,
32+
\Magento\Framework\Controller\ResultFactory::TYPE_LAYOUT,
33+
\Magento\Framework\Controller\ResultFactory::TYPE_PAGE,
34+
\Magento\Framework\Controller\ResultFactory::TYPE_RAW,
35+
\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT
36+
);
37+
38+
registerArgumentsSet(
39+
'scope_types',
40+
\Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
41+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
42+
\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE
43+
);
44+
expectedArguments(
45+
\Magento\Framework\App\Config\ScopeConfigInterface::getValue(),
46+
1,
47+
argumentsSet('scope_types')
48+
);
49+
expectedArguments(
50+
\Magento\Framework\App\Config\ScopeConfigInterface::isSetFlag(),
51+
1,
52+
argumentsSet('scope_types')
53+
);
54+
expectedArguments(
55+
\Magento\Framework\App\Config\MutableScopeConfigInterface::setValue(),
56+
2,
57+
argumentsSet('scope_types')
58+
);
59+
60+
registerArgumentsSet(
61+
'condition_types',
62+
'eq',
63+
'in',
64+
'is',
65+
'to',
66+
'finset',
67+
'from',
68+
'gt',
69+
'gteq',
70+
'like',
71+
'lt',
72+
'lteq',
73+
'moreq',
74+
'neq',
75+
'nin',
76+
'notnull',
77+
'null'
78+
);
79+
expectedArguments(\Magento\Framework\Api\SearchCriteriaBuilder::addFilter(), 2, argumentsSet('condition_types'));
80+
expectedArguments(\Magento\Framework\Api\FilterBuilder::setConditionType(), 0, argumentsSet('condition_types'));
81+
82+
expectedArguments(
83+
\Magento\Framework\Api\SearchCriteriaBuilder::addSortOrder(),
84+
0,
85+
\Magento\Framework\Api\SortOrder::SORT_ASC,
86+
\Magento\Framework\Api\SortOrder::SORT_DESC
87+
);
88+
89+
registerArgumentsSet(
90+
'field_types',
91+
'button',
92+
'checkbox',
93+
'checkboxes',
94+
'column',
95+
'date',
96+
'editablemultiselect',
97+
'editor',
98+
'fieldset',
99+
'file',
100+
'gallery',
101+
'hidden',
102+
'image',
103+
'imagefile',
104+
'label',
105+
'link',
106+
'multiline',
107+
'multiselect',
108+
'note',
109+
'obscure',
110+
'password',
111+
'radio',
112+
'radios',
113+
'reset',
114+
'select',
115+
'submit',
116+
'text',
117+
'textarea',
118+
'time'
119+
);
120+
expectedArguments(\Magento\Framework\Data\Form\AbstractForm::addField(), 1, argumentsSet('field_types'));
121+
expectedArguments(\Magento\Framework\Data\Form\Element\Fieldset::addField(), 1, argumentsSet('field_types'));
122+
6123
}

0 commit comments

Comments
 (0)