Skip to content

Remove forbidden @author tag from Magento_Eav #37002

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

Open
wants to merge 9 commits into
base: 2.4-develop
Choose a base branch
from
9 changes: 3 additions & 6 deletions app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@

/**
* Eav Attribute Block with additional js scripts in template
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Js extends \Magento\Backend\Block\Template
{
/**
* Js template
*
* @var string
*/

protected $_template = 'Magento_Eav::attribute/edit/js.phtml';

/**
Expand All @@ -26,7 +21,7 @@ class Js extends \Magento\Backend\Block\Template
private $inputtype;

/**
* {@inheritdoc}
* @inheritDoc
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
Expand All @@ -38,6 +33,8 @@ public function __construct(
}

/**
* Return compatible input types
*
* @deprecated 102.0.0 Misspelled method
* @see getCompatibleInputTypes
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* Attribute add/edit form options tab
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Labels extends \Magento\Backend\Block\Template
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

/**
* Disable form fields
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class PropertyLocker
{
Expand Down Expand Up @@ -39,6 +37,8 @@ public function __construct(
}

/**
* Lock form data
*
* @param \Magento\Framework\Data\Form $form
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* Validator for check input type value
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Validator extends InArray
{
Expand Down
17 changes: 2 additions & 15 deletions app/code/Magento/Eav/Model/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*
* @method \Magento\Eav\Model\Attribute\Data\AbstractData|null getDataModel()
* Get data model linked to attribute or null.
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Eav\Model;

Expand All @@ -22,21 +20,10 @@
*/
class Attribute extends \Magento\Eav\Model\Entity\Attribute
{
/**
* Name of the module
* Override it
*/
//const MODULE_NAME = 'Magento_Eav';

/**
* Name of the module
* Override it
*/
/** @var string */
protected $_eventObject = 'attribute';

/**
* Active Website instance
*
* @var Website
*/
protected $_website;
Expand Down Expand Up @@ -188,7 +175,7 @@ public function getMultilineCount()
}

/**
* {@inheritdoc}
* @inheritDoc
*/
public function afterDelete()
{
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Eav/Model/Attribute/Data/AbstractData.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*
* phpcs:disable Magento2.Classes.AbstractApi
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @since 100.0.2
*/
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* EAV Entity Attribute Boolean Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Boolean extends \Magento\Eav\Model\Attribute\Data\Select
{
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* EAV Entity Attribute Date Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Date extends \Magento\Eav\Model\Attribute\Data\AbstractData
{
Expand All @@ -28,6 +26,7 @@ public function extractValue(RequestInterface $request)

/**
* Validate data
*
* Return true or array of errors
*
* @param array|string $value
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Hidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* EAV Entity Attribute Hidden text Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Hidden extends \Magento\Eav\Model\Attribute\Data\Text
{
Expand Down
5 changes: 3 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* EAV Entity Attribute Image File Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Image extends \Magento\Eav\Model\Attribute\Data\File
{
Expand All @@ -31,6 +29,7 @@ protected function _validateByRules($value)
$rules = $this->getAttribute()->getValidateRules();
$localStorage = !$this->_directory->getDriver() instanceof ExtendedDriverInterface;
$imageProp = $localStorage
// @phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged,Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative
? @getimagesize($value['tmp_name'])
: $this->_directory->getDriver()->getMetadata($value['tmp_name']);
$allowImageTypes = ['gif', 'jpg', 'jpeg', 'png'];
Expand All @@ -44,8 +43,10 @@ protected function _validateByRules($value)
}

// modify image name
// phpcs:ignore Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative
$extension = pathinfo($value['name'], PATHINFO_EXTENSION);
if ($extension !== $imageProp['extension']) {
// phpcs:ignore Magento2.Functions.DiscouragedFunction.DiscouragedWithAlternative
$value['name'] = pathinfo($value['name'], PATHINFO_FILENAME) . '.' . $imageProp['extension'];
}

Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Multiline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* EAV Entity Attribute Multiply line Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Multiline extends \Magento\Eav\Model\Attribute\Data\Text
{
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Multiselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* EAV Entity Attribute Multiply select Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Multiselect extends AbstractData
{
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

/**
* EAV Entity Attribute Select Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Select extends \Magento\Eav\Model\Attribute\Data\AbstractData
{
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

/**
* EAV Entity Attribute Text Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Text extends \Magento\Eav\Model\Attribute\Data\AbstractData
{
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Attribute/Data/Textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* EAV Entity Attribute Text Area Data Model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Textarea extends \Magento\Eav\Model\Attribute\Data\Text
{
Expand Down
17 changes: 8 additions & 9 deletions app/code/Magento/Eav/Model/AttributeDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@

/**
* EAV Entity Attribute Data Factory
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class AttributeDataFactory
{
const OUTPUT_FORMAT_JSON = 'json';
const OUTPUT_FORMAT_TEXT = 'text';
const OUTPUT_FORMAT_HTML = 'html';
const OUTPUT_FORMAT_PDF = 'pdf';
const OUTPUT_FORMAT_ONELINE = 'oneline';
const OUTPUT_FORMAT_ARRAY = 'array';
public const OUTPUT_FORMAT_JSON = 'json';
public const OUTPUT_FORMAT_TEXT = 'text';
public const OUTPUT_FORMAT_HTML = 'html';
public const OUTPUT_FORMAT_PDF = 'pdf';
public const OUTPUT_FORMAT_ONELINE = 'oneline';
public const OUTPUT_FORMAT_ARRAY = 'array';

// available only for multiply attributes

// available only for multiply attributes
/** @var array */
protected $_dataModels = [];

/**
Expand Down Expand Up @@ -50,6 +48,7 @@ public function __construct(

/**
* Return attribute data model by attribute
*
* Set entity to data model (need for work)
*
* @param \Magento\Eav\Model\Attribute $attribute
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Eav/Model/Entity/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*
* phpcs:disable Magento2.Classes.AbstractApi
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.TooManyFields)
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Entity/Attribute/Model - attribute frontend abstract
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Eav\Model\Entity\Attribute\Frontend;

Expand All @@ -22,6 +20,7 @@
/**
* EAV entity attribute form renderer.
*
* @phpcs:ignore Magento2.Classes.AbstractApi.AbstractApi
* @api
* @since 100.0.2
*/
Expand Down
26 changes: 13 additions & 13 deletions app/code/Magento/Eav/Model/Entity/Attribute/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* @method \Magento\Eav\Model\Entity\Attribute\Set setAttributeSetName(string $value)
* @method int getSortOrder()
* @method \Magento\Eav\Model\Entity\Attribute\Set setSortOrder(int $value)
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Eav\Model\Entity\Attribute;

Expand All @@ -31,13 +29,13 @@ class Set extends \Magento\Framework\Model\AbstractExtensibleModel implements
/**#@+
* Constants
*/
const KEY_ATTRIBUTE_SET_ID = 'attribute_set_id';
const KEY_ATTRIBUTE_SET_NAME = 'attribute_set_name';
const KEY_SORT_ORDER = 'sort_order';
const KEY_ENTITY_TYPE_ID = 'entity_type_id';
public const KEY_ATTRIBUTE_SET_ID = 'attribute_set_id';
public const KEY_ATTRIBUTE_SET_NAME = 'attribute_set_name';
public const KEY_SORT_ORDER = 'sort_order';
public const KEY_ENTITY_TYPE_ID = 'entity_type_id';
/**#@-*/

/**#@-*/
/** @var \Magento\Framework\Model\ResourceModel\Db\AbstractDb */
protected $_resource;

/**
Expand Down Expand Up @@ -253,6 +251,8 @@ public function organizeData($data)
}

/**
* Initialise a group model
*
* @param array $group
* @return Group
*/
Expand Down Expand Up @@ -383,7 +383,7 @@ protected function _getResource()
}

/**
* {@inheritdoc}
* @inheritDoc
* @codeCoverageIgnoreStart
*/
public function getAttributeSetId()
Expand All @@ -392,23 +392,23 @@ public function getAttributeSetId()
}

/**
* {@inheritdoc}
* @inheritDoc
*/
public function getAttributeSetName()
{
return $this->getData(self::KEY_ATTRIBUTE_SET_NAME);
}

/**
* {@inheritdoc}
* @inheritDoc
*/
public function getSortOrder()
{
return $this->getData(self::KEY_SORT_ORDER);
}

/**
* {@inheritdoc}
* @inheritDoc
*/
public function getEntityTypeId()
{
Expand Down Expand Up @@ -471,7 +471,7 @@ public function setEntityTypeId($entityTypeId)
}

/**
* {@inheritdoc}
* @inheritDoc
*
* @return \Magento\Eav\Api\Data\AttributeSetExtensionInterface|null|null
*/
Expand All @@ -481,7 +481,7 @@ public function getExtensionAttributes()
}

/**
* {@inheritdoc}
* @inheritDoc
*
* @param \Magento\Eav\Api\Data\AttributeSetExtensionInterface|null $extensionAttributes
* @return $this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Entity/Attribute/Model - attribute selection source abstract
* phpcs:disable Magento2.Classes.AbstractApi
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @SuppressWarnings(PHPMD.NumberOfChildren)
* @since 100.0.2
*/
Expand Down
2 changes: 0 additions & 2 deletions app/code/Magento/Eav/Model/Entity/Attribute/Source/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* Entity/Attribute/Model - attribute selection source from configuration
*
* this class should be abstract, but kept usual for legacy purposes
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Config extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{
Expand Down
Loading