Skip to content

Commit

Permalink
update PHPDoc standards
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Sep 23, 2019
1 parent 8630fdd commit f0d3796
Show file tree
Hide file tree
Showing 148 changed files with 644 additions and 2,389 deletions.
94 changes: 4 additions & 90 deletions Api/Data/EraseEntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Interface EraseEntityInterface
* @api
*/
interface EraseEntityInterface extends ExtensibleDataInterface
{
/**#@+
/**
* Constants for fields keys
*/
public const ID = 'erase_id';
Expand All @@ -26,143 +25,58 @@ interface EraseEntityInterface extends ExtensibleDataInterface
public const STATUS = 'status';
public const MESSAGE = 'message';
public const ERASED_AT = 'erased_at';
/**#@-*/

/**#@+
/**
* Constants for State values
*/
public const STATE_PENDING = 'pending';
public const STATE_PROCESSING = 'processing';
public const STATE_COMPLETE = 'complete';
/**#@-*/

/**#@+
/**
* Constants for Status values
*/
public const STATUS_READY = 'ready';
public const STATUS_RUNNING = 'running';
public const STATUS_FAILED = 'failed';
public const STATUS_SUCCEED = 'succeed';
/**#@-*/

/**
* Retrieve the erase ID
*
* @return int
*/
public function getEraseId(): int;

/**
* Set the erase ID
*
* @param int $eraseId
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setEraseId(int $eraseId): EraseEntityInterface;

/**
* Retrieve the entity ID
*
* @return int
*/
public function getEntityId(): int;

/**
* Set the entity ID
*
* @param int $entityId
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
* @return EraseEntityInterface
* @todo force type in php7.4
*/
public function setEntityId($entityId): EraseEntityInterface;

/**
* Retrieve the entity type
*
* @return string
*/
public function getEntityType(): string;

/**
* Set the entity type
*
* @param string $entityType
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setEntityType(string $entityType): EraseEntityInterface;

/**
* Retrieve the scheduled at
*
* @return string
*/
public function getScheduledAt(): string;

/**
* Set the schedule at
*
* @param string $scheduledAt
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setScheduledAt(string $scheduledAt): EraseEntityInterface;

/**
* Retrieve the state
*
* @return string
*/
public function getState(): string;

/**
* Set the state
*
* @param string $state
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setState(string $state): EraseEntityInterface;

/**
* Retrieve the status
*
* @return string
*/
public function getStatus(): string;

/**
* Set the status
*
* @param string $status
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setStatus(string $status): EraseEntityInterface;

/**
* Retrieve the error message
*
* @return string|null
*/
public function getMessage(): ?string;

/**
* Set the error message
*
* @param string|null $message
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setMessage(?string $message): EraseEntityInterface;

/**
* Retrieve the erased at if it exists
*
* @return string|null
*/
public function getErasedAt(): ?string;

/**
* Set the erased at
*
* @param string $erasedAt
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface
*/
public function setErasedAt(string $erasedAt): EraseEntityInterface;
}
7 changes: 3 additions & 4 deletions Api/Data/EraseEntitySearchResultsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@
use Magento\Framework\Api\SearchResultsInterface;

/**
* Interface EraseEntitySearchResultsInterface
* @api
*/
interface EraseEntitySearchResultsInterface extends SearchResultsInterface
{
/**
* Retrieve the erase entity schedulers list
*
* @return \Opengento\Gdpr\Api\Data\EraseEntityInterface[]
* @return EraseEntityInterface[]
*/
public function getItems(): array;

/**
* Set the erase entity schedulers list
*
* @param \Opengento\Gdpr\Api\Data\EraseEntityInterface[] $items
* @return \Opengento\Gdpr\Api\Data\EraseEntitySearchResultsInterface
* @param EraseEntityInterface[] $items
* @return EraseEntitySearchResultsInterface
*/
public function setItems(array $items): EraseEntitySearchResultsInterface;
}
90 changes: 3 additions & 87 deletions Api/Data/ExportEntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
namespace Opengento\Gdpr\Api\Data;

/**
* Interface ExportEntityInterface
* @api
*/
interface ExportEntityInterface
{
/**#@+
/**
* Constants for fields keys
*/
public const ID = 'export_id';
Expand All @@ -24,126 +23,43 @@ interface ExportEntityInterface
public const CREATED_AT = 'created_at';
public const EXPORTED_AT = 'exported_at';
public const EXPIRED_AT = 'expired_at';
/**#@-*/

/**
* Retrieve the export ID
*
* @return int
*/
public function getExportId(): int;

/**
* Set the export ID
*
* @param int $exportId
* @return ExportEntityInterface
*/
public function setExportId(int $exportId): ExportEntityInterface;

/**
* Retrieve the entity ID to export
*
* @return int
*/
public function getEntityId(): int;

/**
* Set the entity ID to export
* Set the entity ID
*
* @param int $entityId
* @return ExportEntityInterface
* @todo force type in php7.4
*/
public function setEntityId($entityId): ExportEntityInterface;

/**
* Retrieve the entity type to export
*
* @return string
*/
public function getEntityType(): string;

/**
* Set the entity type to export
*
* @param string $entityType
* @return ExportEntityInterface
* @todo force type in php7.4
*/
public function setEntityType(string $entityType): ExportEntityInterface;

/**
* Retrieve the file name to export the data to
*
* @return string
*/
public function getFileName(): string;

/**
* Set the file name to export the data to
*
* @param string $filename
* @return ExportEntityInterface
*/
public function setFileName(string $filename): ExportEntityInterface;

/**
* Retrieve the export file absolute path
*
* @return string|null
*/
public function getFilePath(): ?string;

/**
* Set the export file absolute path
*
* @param string $filePath
* @return ExportEntityInterface
*/
public function setFilePath(string $filePath): ExportEntityInterface;

/**
* Retrieve the created at date of the export
*
* @return string
*/
public function getCreatedAt(): string;

/**
* Set the created at date of the export
*
* @param string $createdAt
* @return ExportEntityInterface
*/
public function setCreatedAt(string $createdAt): ExportEntityInterface;

/**
* Retrieve the last exported at date
*
* @return string|null
*/
public function getExportedAt(): ?string;

/**
* Set the last exported at date
*
* @param string $exportedAt
* @return ExportEntityInterface
*/
public function setExportedAt(string $exportedAt): ExportEntityInterface;

/**
* Retrieve the date expiration of the export
*
* @return string
*/
public function getExpiredAt(): string;

/**
* Set the expiration date of the export
*
* @param string $expiredAt
* @return ExportEntityInterface
*/
public function setExpiredAt(string $expiredAt): ExportEntityInterface;
}
7 changes: 3 additions & 4 deletions Api/Data/ExportEntitySearchResultsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@
use Magento\Framework\Api\SearchResultsInterface;

/**
* Interface ExportEntitySearchResultsInterface
* @api
*/
interface ExportEntitySearchResultsInterface extends SearchResultsInterface
{
/**
* Retrieve the export entities list
*
* @return \Opengento\Gdpr\Api\Data\ExportEntityInterface[]
* @return ExportEntityInterface[]
*/
public function getItems(): array;

/**
* Set the export entities list
*
* @param \Opengento\Gdpr\Api\Data\ExportEntityInterface[] $items
* @return \Opengento\Gdpr\Api\Data\ExportEntitySearchResultsInterface
* @param ExportEntityInterface[] $items
* @return ExportEntitySearchResultsInterface
*/
public function setItems(array $items): ExportEntitySearchResultsInterface;
}
Loading

0 comments on commit f0d3796

Please sign in to comment.