Skip to content

1011: Updated docblock for code generator #1022

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

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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use Symfony\Component\Console\Output\OutputInterface;
class ${NAME} extends Command
{
/**
* @inheritDoc
* Initialization of the command.
*/
protected function configure()
{
Expand All @@ -22,7 +22,7 @@ class ${NAME} extends Command
}

/**
* CLI command description
* CLI command description.
*
* @param InputInterface $input
* @param OutputInterface $output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
protected $_eventPrefix = '${DB_NAME}_collection';

/**
* @inheritdoc
* Initialize collection model.
*/
protected function _construct()
{
Expand Down
14 changes: 1 addition & 13 deletions resources/fileTemplates/internal/Magento Data Model.php.ft
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
{
#if (${PROPERTIES} && !$hasInterface)
/**
* String constants for property names
* String constants for property names.
*/
#set ($properties = ${PROPERTIES})
#foreach ($property in $properties.split(","))
Expand All @@ -41,17 +41,11 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
#if(!($foreach.first))

#end
#if ($hasInterface)
/**
* @inheritDoc
*/
#else
/**
* Getter for $propertyUpperCamel.
*
* @return $propertyType|null
*/
#end
public function get$propertyUpperCamel(): ?$propertyType
{
#if($propertyType == 'string')
Expand All @@ -62,19 +56,13 @@ class ${NAME} #if (${EXTENDS})extends ${EXTENDS} #end #if (${IMPLEMENTS} && $has
#end
}

#if ($hasInterface)
/**
* @inheritDoc
*/
#else
/**
* Setter for $propertyUpperCamel.
*
* @param $propertyType|null $$propertyLowerCamel
*
* @return void
*/
#end
public function set$propertyUpperCamel(?$propertyType $$propertyLowerCamel): void
{
$this->setData(self::$propertyUpperSnake, $$propertyLowerCamel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ use $use;
class ${CLASS_NAME} extends ${PARENT_CLASS_NAME} implements ${INTERFACE_NAME}
{
/**
* @inheritDoc
* Set items list.
*
* @param array $items
*
* @return ${INTERFACE_NAME}
*/
public function setItems(array $items): ${INTERFACE_NAME}
{
return parent::setItems($items);
}

/**
* @inheritDoc
* Get items list.
*
* @return array
*/
public function getItems(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}

/**
* Url paths.
* #@+
*/
private const EDIT_URL_PATH = '${EDIT_URL_PATH}';
private const DELETE_URL_PATH = '${DELETE_URL_PATH}';
/** #@- */

/**
* @var ${URL}
Expand Down Expand Up @@ -55,7 +53,11 @@ class ${CLASS_NAME} extends ${PARENT_CLASS}
}

/**
* @inheritDoc
* Prepare data source.
*
* @param array $dataSource
*
* @return array
*/
public function prepareDataSource(array $dataSource): array
{
Expand Down
4 changes: 3 additions & 1 deletion resources/fileTemplates/internal/Magento Model Class.php.ft
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
protected $_eventPrefix = '${DB_NAME}_model';

/**
* @inheritdoc
* Initialize magento model.
*
* @return void
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ${NAME}#if (${EXTENDS}) extends ${EXTENDS}#end#if (${IMPLEMENTS}) implemen
protected $_eventPrefix = '${DB_NAME}_resource_model';

/**
* @inheritdoc
* Initialize resource model.
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
}

/**
* @inheritDoc
* Returns searching result.
*
* @return ${SEARCH_RESULT_FACTORY}
*/
public function getSearchResult()
{
Expand Down Expand Up @@ -119,7 +121,9 @@ class ${CLASS_NAME} extends ${EXTENDS}
}
#else
/**
* @inheritDoc
* Get data.
*
* @return array
*/
public function getData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class TestCLICommandPHPClass extends Command
{
/**
* @inheritDoc
* Initialization of the command.
*/
protected function configure()
{
Expand All @@ -19,7 +19,7 @@ protected function configure()
}

/**
* CLI command description
* CLI command description.
*
* @param InputInterface $input
* @param OutputInterface $output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
class Sample extends DataObject implements SampleInterface
{
/**
* @inheritDoc
* Getter for IdProperty.
*
* @return int|null
*/
public function getIdProperty(): ?int
{
Expand All @@ -17,23 +19,33 @@ public function getIdProperty(): ?int
}

/**
* @inheritDoc
* Setter for IdProperty.
*
* @param int|null $idProperty
*
* @return void
*/
public function setIdProperty(?int $idProperty): void
{
$this->setData(self::ID_PROPERTY, $idProperty);
}

/**
* @inheritDoc
* Getter for SampleProperty.
*
* @return string|null
*/
public function getSampleProperty(): ?string
{
return $this->getData(self::SAMPLE_PROPERTY);
}

/**
* @inheritDoc
* Setter for SampleProperty.
*
* @param string|null $sampleProperty
*
* @return void
*/
public function setSampleProperty(?string $sampleProperty): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Sample extends DataObject
{
/**
* String constants for property names
* String constants for property names.
*/
const ID_PROPERTY = "id_property";
const SAMPLE_PROPERTY = "sample_property";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ class BookBlockActions extends Column

/**
* Url paths.
* #@+
*/
private const EDIT_URL_PATH = 'book_book_edit';
private const DELETE_URL_PATH = 'book_book_delete';
/** #@- */

/**
* @var UrlInterface
Expand Down Expand Up @@ -56,7 +54,11 @@ public function __construct(
}

/**
* @inheritDoc
* Prepare data source.
*
* @param array $dataSource
*
* @return array
*/
public function prepareDataSource(array $dataSource): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TestCollection extends AbstractCollection
protected $_eventPrefix = 'my_table_collection';

/**
* @inheritdoc
* Initialize collection model.
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Collection extends AbstractCollection
protected $_eventPrefix = 'my_table_collection';

/**
* @inheritdoc
* Initialize collection model.
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class TestModel extends AbstractModel
protected $_eventPrefix = 'my_table_model';

/**
* @inheritdoc
* Initialize magento model.
*
* @return void
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class Test extends AbstractModel
protected $_eventPrefix = 'my_table_model';

/**
* @inheritdoc
* Initialize magento model.
*
* @return void
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestResourceModel extends AbstractDb
protected $_eventPrefix = 'my_table_resource_model';

/**
* @inheritdoc
* Initialize resource model.
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestResourceModel extends AbstractDb
protected $_eventPrefix = 'my_table_resource_model';

/**
* @inheritdoc
* Initialize resource model.
*/
protected function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@
class BookSearchResults extends SearchResults implements BookSearchResultsInterface
{
/**
* @inheritDoc
* Set items list.
*
* @param array $items
*
* @return BookSearchResultsInterface
*/
public function setItems(array $items): BookSearchResultsInterface
{
return parent::setItems($items);
}

/**
* @inheritDoc
* Get items list.
*
* @return array
*/
public function getItems(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
class GridDataProvider extends DataProvider
{
/**
* @inheritDoc
* Get data.
*
* @return array
*/
public function getData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public function __construct(
}

/**
* @inheritDoc
* Returns searching result.
*
* @return SearchResultFactory
*/
public function getSearchResult()
{
Expand Down