Skip to content

Commit 26333ca

Browse files
Merge pull request #1022 from doninAtwix/1011-update-docblock-for-code-generator
1011: Updated docblock for code generator
2 parents b1dbfbe + e126871 commit 26333ca

File tree

21 files changed

+75
-45
lines changed

21 files changed

+75
-45
lines changed

resources/fileTemplates/internal/Magento CLI Command Class.php.ft

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use Symfony\Component\Console\Output\OutputInterface;
1212
class ${NAME} extends Command
1313
{
1414
/**
15-
* @inheritDoc
15+
* Initialization of the command.
1616
*/
1717
protected function configure()
1818
{
@@ -22,7 +22,7 @@ class ${NAME} extends Command
2222
}
2323

2424
/**
25-
* CLI command description
25+
* CLI command description.
2626
*
2727
* @param InputInterface $input
2828
* @param OutputInterface $output

resources/fileTemplates/internal/Magento Collection Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_collection';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize collection model.
2121
*/
2222
protected function _construct()
2323
{

resources/fileTemplates/internal/Magento Data Model.php.ft

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
1919
{
2020
#if (${PROPERTIES} && !$hasInterface)
2121
/**
22-
* String constants for property names
22+
* String constants for property names.
2323
*/
2424
#set ($properties = ${PROPERTIES})
2525
#foreach ($property in $properties.split(","))
@@ -41,17 +41,11 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
4141
#if(!($foreach.first))
4242

4343
#end
44-
#if ($hasInterface)
45-
/**
46-
* @inheritDoc
47-
*/
48-
#else
4944
/**
5045
* Getter for $propertyUpperCamel.
5146
*
5247
* @return $propertyType|null
5348
*/
54-
#end
5549
public function get$propertyUpperCamel(): ?$propertyType
5650
{
5751
#if($propertyType == 'string')
@@ -62,19 +56,13 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
6256
#end
6357
}
6458

65-
#if ($hasInterface)
66-
/**
67-
* @inheritDoc
68-
*/
69-
#else
7059
/**
7160
* Setter for $propertyUpperCamel.
7261
*
7362
* @param $propertyType|null $$propertyLowerCamel
7463
*
7564
* @return void
7665
*/
77-
#end
7866
public function set$propertyUpperCamel(?$propertyType $$propertyLowerCamel): void
7967
{
8068
$this->setData(self::$propertyUpperSnake, $$propertyLowerCamel);

resources/fileTemplates/internal/Magento Entity Search Results.php.ft

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,21 @@ use $use;
1414
class ${CLASS_NAME} extends ${PARENT_CLASS_NAME} implements ${INTERFACE_NAME}
1515
{
1616
/**
17-
* @inheritDoc
17+
* Set items list.
18+
*
19+
* @param array $items
20+
*
21+
* @return ${INTERFACE_NAME}
1822
*/
1923
public function setItems(array $items): ${INTERFACE_NAME}
2024
{
2125
return parent::setItems($items);
2226
}
2327

2428
/**
25-
* @inheritDoc
29+
* Get items list.
30+
*
31+
* @return array
2632
*/
2733
public function getItems(): array
2834
{

resources/fileTemplates/internal/Magento Grid Ui Component Action Column Class.php.ft

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
2020

2121
/**
2222
* Url paths.
23-
* #@+
2423
*/
2524
private const EDIT_URL_PATH = '${EDIT_URL_PATH}';
2625
private const DELETE_URL_PATH = '${DELETE_URL_PATH}';
27-
/** #@- */
2826

2927
/**
3028
* @var ${URL}
@@ -55,7 +53,11 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
5553
}
5654

5755
/**
58-
* @inheritDoc
56+
* Prepare data source.
57+
*
58+
* @param array $dataSource
59+
*
60+
* @return array
5961
*/
6062
public function prepareDataSource(array $dataSource): array
6163
{

resources/fileTemplates/internal/Magento Model Class.php.ft

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_model';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize magento model.
21+
*
22+
* @return void
2123
*/
2224
protected function _construct()
2325
{

resources/fileTemplates/internal/Magento Resource Model Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
1717
protected $_eventPrefix = '${DB_NAME}_resource_model';
1818

1919
/**
20-
* @inheritdoc
20+
* Initialize resource model.
2121
*/
2222
protected function _construct()
2323
{

resources/fileTemplates/internal/Magento UI Component Custom Data Provider Class.php.ft

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
7676
}
7777

7878
/**
79-
* @inheritDoc
79+
* Returns searching result.
80+
*
81+
* @return ${SEARCH_RESULT_FACTORY}
8082
*/
8183
public function getSearchResult()
8284
{
@@ -119,7 +121,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
119121
}
120122
#else
121123
/**
122-
* @inheritDoc
124+
* Get data.
125+
*
126+
* @return array
123127
*/
124128
public function getData()
125129
{

testData/actions/generation/generator/CLICommandClassGenerator/generateCLICommandClass/TestCLICommandPHPClass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class TestCLICommandPHPClass extends Command
1010
{
1111
/**
12-
* @inheritDoc
12+
* Initialization of the command.
1313
*/
1414
protected function configure()
1515
{
@@ -19,7 +19,7 @@ protected function configure()
1919
}
2020

2121
/**
22-
* CLI command description
22+
* CLI command description.
2323
*
2424
* @param InputInterface $input
2525
* @param OutputInterface $output

testData/actions/generation/generator/DataModelGenerator/generateDataModel/Sample.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
class Sample extends DataObject implements SampleInterface
99
{
1010
/**
11-
* @inheritDoc
11+
* Getter for IdProperty.
12+
*
13+
* @return int|null
1214
*/
1315
public function getIdProperty(): ?int
1416
{
@@ -17,23 +19,33 @@ public function getIdProperty(): ?int
1719
}
1820

1921
/**
20-
* @inheritDoc
22+
* Setter for IdProperty.
23+
*
24+
* @param int|null $idProperty
25+
*
26+
* @return void
2127
*/
2228
public function setIdProperty(?int $idProperty): void
2329
{
2430
$this->setData(self::ID_PROPERTY, $idProperty);
2531
}
2632

2733
/**
28-
* @inheritDoc
34+
* Getter for SampleProperty.
35+
*
36+
* @return string|null
2937
*/
3038
public function getSampleProperty(): ?string
3139
{
3240
return $this->getData(self::SAMPLE_PROPERTY);
3341
}
3442

3543
/**
36-
* @inheritDoc
44+
* Setter for SampleProperty.
45+
*
46+
* @param string|null $sampleProperty
47+
*
48+
* @return void
3749
*/
3850
public function setSampleProperty(?string $sampleProperty): void
3951
{

0 commit comments

Comments
 (0)