From fb08c77e94e8b4238dd48ff9c37d397072e9d63a Mon Sep 17 00:00:00 2001 From: todstoychev Date: Wed, 11 Nov 2015 11:07:58 +0200 Subject: [PATCH] Classes docblocks added --- src/Console/RebuildCommand.php | 6 ++ src/Exception/FileLimitExceededException.php | 14 ++++ src/Exception/FileLimitExeededException.php | 8 --- .../InvalidConfigurationValueException.php | 6 ++ .../MandatoryConfigValueMissingException.php | 6 ++ .../NonAllowedFileExtensionException.php | 6 ++ src/Exception/NonAllowedMimeTypeException.php | 6 ++ src/Exception/NonExistingContextException.php | 6 ++ src/Handler/AbstractHandler.php | 16 ++++- .../ConfigurationValidationHandler.php | 38 +++++++++++ src/Handler/DeleteImageHandler.php | 23 +++++++ src/Handler/DirectoryHandler.php | 16 +++++ src/Handler/OpenImageHandler.php | 7 ++ src/Handler/UploadedFileHandler.php | 66 ++++++++++++++----- src/Icr.php | 14 ++++ src/Operation/AbstractOperation.php | 22 +++++++ src/Operation/CropOperation.php | 17 +++++ src/Operation/ResizeCropOperation.php | 53 ++++++++++++++- src/Operation/ResizeOperation.php | 26 +++++++- src/Operation/ScaleOperation.php | 12 ++++ src/Processor.php | 57 ++++++++++++++++ src/Reader/DirectoryTreeReader.php | 6 ++ src/ServiceProvider.php | 15 +++-- src/StaticData/Drivers.php | 3 +- src/StaticData/Operations.php | 2 +- 25 files changed, 413 insertions(+), 38 deletions(-) create mode 100644 src/Exception/FileLimitExceededException.php delete mode 100644 src/Exception/FileLimitExeededException.php diff --git a/src/Console/RebuildCommand.php b/src/Console/RebuildCommand.php index aa44610..0acb099 100644 --- a/src/Console/RebuildCommand.php +++ b/src/Console/RebuildCommand.php @@ -5,6 +5,12 @@ use Illuminate\Console\Command; use Todstoychev\Icr\Processor; +/** + * Rebuild images in particular context. + * + * @author Todor Todorov + * @package Todstoychev\Icr\Console + */ class RebuildCommand extends Command { diff --git a/src/Exception/FileLimitExceededException.php b/src/Exception/FileLimitExceededException.php new file mode 100644 index 0000000..4668c5b --- /dev/null +++ b/src/Exception/FileLimitExceededException.php @@ -0,0 +1,14 @@ + + * @package Todstoychev\Icr\Exception + */ +class FileLimitExceededException extends \Exception +{ + +} \ No newline at end of file diff --git a/src/Exception/FileLimitExeededException.php b/src/Exception/FileLimitExeededException.php deleted file mode 100644 index c2669d3..0000000 --- a/src/Exception/FileLimitExeededException.php +++ /dev/null @@ -1,8 +0,0 @@ - + * @package Todstoychev\Icr\Exception + */ class InvalidConfigurationValueException extends \Exception { diff --git a/src/Exception/MandatoryConfigValueMissingException.php b/src/Exception/MandatoryConfigValueMissingException.php index 5f5af34..a5e70b0 100644 --- a/src/Exception/MandatoryConfigValueMissingException.php +++ b/src/Exception/MandatoryConfigValueMissingException.php @@ -2,6 +2,12 @@ namespace Todstoychev\Icr\Exception; +/** + * Handles mandatory configuration value missing error + * + * @author Todor Todorov + * @package Todstoychev\Icr\Exception + */ class MandatoryConfigValueMissingException extends \Exception { diff --git a/src/Exception/NonAllowedFileExtensionException.php b/src/Exception/NonAllowedFileExtensionException.php index 63b31db..ccf229b 100644 --- a/src/Exception/NonAllowedFileExtensionException.php +++ b/src/Exception/NonAllowedFileExtensionException.php @@ -2,6 +2,12 @@ namespace Todstoychev\Icr\Exception; +/** + * Handles non allowed file extension error + * + * @author Todor Todorov + * @package Todstoychev\Icr\Exception + */ class NonAllowedFileExtensionException extends \Exception { diff --git a/src/Exception/NonAllowedMimeTypeException.php b/src/Exception/NonAllowedMimeTypeException.php index 573d82c..284b7e1 100644 --- a/src/Exception/NonAllowedMimeTypeException.php +++ b/src/Exception/NonAllowedMimeTypeException.php @@ -2,6 +2,12 @@ namespace Todstoychev\Icr\Exception; +/** + * Handles non allowed mime type error + * + * @author Todor Todorov + * @package Todstoychev\Icr\Exception + */ class NonAllowedMimeTypeException extends \Exception { diff --git a/src/Exception/NonExistingContextException.php b/src/Exception/NonExistingContextException.php index a390852..0eae82c 100644 --- a/src/Exception/NonExistingContextException.php +++ b/src/Exception/NonExistingContextException.php @@ -2,6 +2,12 @@ namespace Todstoychev\Icr\Exception; +/** + * Handles non existing context name + * + * @author Todor Todorov + * @package Todstoychev\Icr\Exception + */ class NonExistingContextException extends \Exception { diff --git a/src/Handler/AbstractHandler.php b/src/Handler/AbstractHandler.php index f339b7d..e81b636 100644 --- a/src/Handler/AbstractHandler.php +++ b/src/Handler/AbstractHandler.php @@ -45,6 +45,12 @@ public function setConfig($config) return $this; } + /** + * Gets the uploads path parameter from configuration + * + * @return string + * @throws Exception\NonExistingArrayKeyException + */ public function getUploadsPath() { if (!array_key_exists('uploads_path', $this->getConfig())) { @@ -54,10 +60,18 @@ public function getUploadsPath() return $this->config['uploads_path']; } + /** + * Gets the context values array + * + * @param $context + * + * @return array + * @throws Exception\NonExistingContextException + */ public function getContextValues($context) { if (!array_key_exists($context, $this->config)) { - throw new Exception\NonExsitingContextException("No context values found for '{$context}'"); + throw new Exception\NonExistingContextException("No context values found for '{$context}'"); } return $this->config[$context]; diff --git a/src/Handler/ConfigurationValidationHandler.php b/src/Handler/ConfigurationValidationHandler.php index 7f34f19..8150df8 100644 --- a/src/Handler/ConfigurationValidationHandler.php +++ b/src/Handler/ConfigurationValidationHandler.php @@ -14,6 +14,14 @@ class ConfigurationValidationHandler extends AbstractHandler { + /** + * Validates provided context name + * + * @param string $context + * + * @return ConfigurationValidationHandler + * @throws Exception\NonExistingContextException + */ public function validateContext($context) { // Check is context set @@ -24,6 +32,15 @@ public function validateContext($context) return $this; } + /** + * Validates configuration values for provided context + * + * @param string $context + * + * @return ConfigurationValidationHandler + * @throws Exception\InvalidConfigurationValueException + * @throws Exception\MandatoryConfigValueMissingException + */ public function validateConfigValues($context) { foreach ($this->config[$context] as $values) { @@ -36,6 +53,12 @@ public function validateConfigValues($context) return $this; } + /** + * Validetes provided image library driver + * + * @return ConfigurationValidationHandler + * @throws Exception\InvalidConfigurationValueException + */ public function validateDriver() { if ( @@ -48,6 +71,14 @@ public function validateDriver() return $this; } + /** + * Validate key value + * + * @param string $keyName + * @param array $values + * + * @throws Exception\MandatoryConfigValueMissingException + */ protected function validateKeyValues($keyName, array $values) { if (!array_key_exists($keyName, $values)) { @@ -57,6 +88,13 @@ protected function validateKeyValues($keyName, array $values) } } + /** + * Validates value type + * + * @param array $values + * + * @throws Exception\InvalidConfigurationValueException + */ protected function validateValuesType(array $values) { if (!in_array($values['operation'], StaticData\Operations::$allowedOperations)) { diff --git a/src/Handler/DeleteImageHandler.php b/src/Handler/DeleteImageHandler.php index 3ba15f3..5245a7b 100644 --- a/src/Handler/DeleteImageHandler.php +++ b/src/Handler/DeleteImageHandler.php @@ -2,8 +2,23 @@ namespace Todstoychev\Icr\Handler; +/** + * Handles delete image operations + * + * @author Todor Todorov + * @package Todstoychev\Icr\Handler + */ class DeleteImageHandler extends AbstractHandler { + /** + * Delete only reized images and keeps the original image + * + * @param string $context + * @param string $fileName + * + * @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException + * @throws \Todstoychev\Icr\Exception\NonExistingContextException + */ public function deleteImageSizes($context, $fileName) { $contextPath = public_path($this->getUploadsPath() . '/' . $context); @@ -15,6 +30,14 @@ public function deleteImageSizes($context, $fileName) } } + /** + * Copletely deletes an image + * + * @param string $context + * @param string $fileName + * + * @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException + */ public function deleteImage($context, $fileName) { $this->deleteImageSizes($context, $fileName); diff --git a/src/Handler/DirectoryHandler.php b/src/Handler/DirectoryHandler.php index 7a27178..721aad8 100644 --- a/src/Handler/DirectoryHandler.php +++ b/src/Handler/DirectoryHandler.php @@ -11,6 +11,14 @@ class DirectoryHandler extends AbstractHandler { + /** + * Checks if directory exists. If directory is missing, creates it. + * + * @param string $context + * + * @return DirectoryHandler + * @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException + */ public function checkAndCreateDirectories($context) { $path = public_path($this->getUploadsPath()); @@ -34,6 +42,14 @@ public function checkAndCreateDirectories($context) return $this; } + /** + * Delete all context files and directories in the directory tree + * + * @param string $context + * + * @return DirectoryHandler + * @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException + */ public function deleteContextFilesAndDirectories($context) { foreach ($this->config[$context] as $sizeName => $values) { diff --git a/src/Handler/OpenImageHandler.php b/src/Handler/OpenImageHandler.php index d157070..3ee9728 100644 --- a/src/Handler/OpenImageHandler.php +++ b/src/Handler/OpenImageHandler.php @@ -4,6 +4,13 @@ use Todstoychev\Icr\Exception\ExtensionNotFoundException; +/** + * Handles existing image openning and creates the necessary image object, depending on the driver set + * in the configuration. + * + * @author Todor Todorov + * @package Todstoychev\Icr\Handler + */ class OpenImageHandler extends AbstractHandler { /** diff --git a/src/Handler/UploadedFileHandler.php b/src/Handler/UploadedFileHandler.php index 7b7ecb9..b7452bf 100644 --- a/src/Handler/UploadedFileHandler.php +++ b/src/Handler/UploadedFileHandler.php @@ -5,6 +5,12 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; use Todstoychev\Icr\Exception; +/** + * Handles the uploaded file + * + * @author Todor Todorov + * @package Todstoychev\Icr\Handler + */ class UploadedFileHandler extends AbstractHandler { /** @@ -57,23 +63,16 @@ public function setFileName($fileName) return $this; } - public function getUploadedFileWidth() - { - - } - - public function getUploadedFileHeight() - { - - } - - public function getUploadedFileDimensions() - { - list($width, $height) = getimagesize($this->getUploadedFile()); - - var_dump($width); - } - + /** + * Main handler method. Validates the uploaded file and saves it. + * + * @param UploadedFile $uploadedFile + * @param string $context + * + * @throws Exception\FileLimitExceededException + * @throws Exception\NonAllowedFileExtensionException + * @throws Exception\NonAllowedMimeTypeException + */ public function handle(UploadedFile $uploadedFile, $context) { $this->setUploadedFile($uploadedFile); @@ -83,6 +82,15 @@ public function handle(UploadedFile $uploadedFile, $context) $this->saveOriginalFile($context); } + /** + * Validates the uploaded file + * + * @param string $context + * + * @return UploadedFileHandler + * @throws Exception\NonAllowedFileExtensionException + * @throws Exception\NonAllowedMimeTypeException + */ protected function validateUploadedFile($context) { $allowedFileTypes = $this->getAllowedFileTypes($context); @@ -102,17 +110,31 @@ protected function validateUploadedFile($context) return $this; } + /** + * Checks file size. If exceeded throws exception. + * + * @return UploadedFileHandler + * @throws Exception\FileLimitExceededException + */ protected function checkFileSize() { $phpIni = ini_get('upload_max_filesize'); $mb = str_replace('M', '', $phpIni); $bytes = $mb * 1048576; if ($this->getUploadedFile()->getSize() > $bytes) { - throw new Exception\FileLimitExeededException('File too large'); + throw new Exception\FileLimitExceededException('File too large'); } return $this; } + /** + * Generates unique file name + * + * @param string $context + * + * @return UploadedFileHandler + * @throws Exception\NonExistingArrayKeyException + */ protected function generateFileName($context) { $extension = $this->getUploadedFile()->getClientOriginalExtension(); @@ -125,6 +147,14 @@ protected function generateFileName($context) return $this; } + /** + * Saves the original file + * + * @param string $context + * + * @return UploadedFileHandler + * @throws Exception\NonExistingArrayKeyException + */ protected function saveOriginalFile($context) { $path = public_path($this->getUploadsPath() . '/' . $context); diff --git a/src/Icr.php b/src/Icr.php index b878c0b..ea2f3ca 100644 --- a/src/Icr.php +++ b/src/Icr.php @@ -12,11 +12,25 @@ */ class Icr { + /** + * Handles upload image + * + * @param UploadedFile $uploadedFile + * @param string $context + * @return mixed + */ public static function uploadImage(UploadedFile $uploadedFile, $context) { return app('icr.processor')->upload($uploadedFile, $context); } + /** + * Handles delete image + * + * @param string $fileName + * @param string $context + * @return mixed + */ public static function deleteImage($fileName, $context) { return app('icr.processor')->delete($fileName, $context); diff --git a/src/Operation/AbstractOperation.php b/src/Operation/AbstractOperation.php index b996699..93592c5 100644 --- a/src/Operation/AbstractOperation.php +++ b/src/Operation/AbstractOperation.php @@ -2,8 +2,15 @@ namespace Todstoychev\Icr\Operation; +use Imagine\Image\Box; use Imagine\Image\ImageInterface; +/** + * Abstract operation class + * + * @author Todor Todorov + * @package Todstoychev\Icr\Operation + */ abstract class AbstractOperation { @@ -22,6 +29,11 @@ abstract class AbstractOperation */ protected $height; + /** + * @param ImageInterface $image + * @param int $width + * @param int $height + */ public function __construct(ImageInterface $image, $width, $height) { $this->setImage($image); @@ -89,7 +101,17 @@ public function setHeight($height) return $this; } + /** + * Performs operation action + * + * @return AbstractOperation + */ abstract public function doAction(); + /** + * Creates box object + * + * @return Box + */ abstract protected function createBox(); } \ No newline at end of file diff --git a/src/Operation/CropOperation.php b/src/Operation/CropOperation.php index 7cf7eaf..4afb4d4 100644 --- a/src/Operation/CropOperation.php +++ b/src/Operation/CropOperation.php @@ -5,9 +5,18 @@ use Imagine\Image\Box; use Imagine\Image\Point; +/** + * Performs crop image operation + * + * @author Todor Todorov + * @package Todstoychev\Icr\Operation + */ class CropOperation extends AbstractOperation { + /** + * @inheritdoc + */ public function doAction() { $this->getImage()->crop($this->createCropPoint(), $this->createBox()); @@ -15,11 +24,19 @@ public function doAction() return $this; } + /** + * @inheritdoc + */ protected function createBox() { return new Box($this->getWidth(), $this->getHeight()); } + /** + * Creates point object representing the crop start point. + * + * @return Point + */ protected function createCropPoint() { $imageWidth = $this->getImage()->getSize()->getWidth(); diff --git a/src/Operation/ResizeCropOperation.php b/src/Operation/ResizeCropOperation.php index 1c835a8..7d4471f 100644 --- a/src/Operation/ResizeCropOperation.php +++ b/src/Operation/ResizeCropOperation.php @@ -4,10 +4,20 @@ use Imagine\Image\Box; use Imagine\Image\Point; - +use Todstoychev\Icr\Exception\ResizeRatioException; + +/** + * Performs resize crop operation + * + * @author Todor Todorov + * @package Todstoychev\Icr\Operation + */ class ResizeCropOperation extends AbstractOperation { + /** + * @inheritdoc + */ public function doAction() { $this->getImage()->resize($this->createBox()); @@ -19,6 +29,13 @@ public function doAction() return $this; } + /** + * Calculates resize ration. If ratio is less then 1 throws exception. This means the uploaded image + * is less then the output dimensions. + * + * @return float + * @throws ResizeRatioException + */ protected function calculateRatio() { $widthRatio = $this->getImage()->getSize()->getWidth() / $this->getWidth(); @@ -33,21 +50,41 @@ protected function calculateRatio() return $ratio; } + /** + * Calculates output image width + * + * @return float + * @throws ResizeRatioException + */ protected function calculateWidth() { return $this->getImage()->getSize()->getWidth() / $this->calculateRatio(); } + /** + * Calculates output image height + * + * @return float + * @throws ResizeRatioException + */ protected function calculateHeight() { return $this->getImage()->getSize()->getHeight() / $this->calculateRatio(); } + /** + * @inheritdoc + */ protected function createBox() { return new Box($this->calculateWidth(), $this->calculateHeight()); } + /** + * Creates crop point + * + * @return Point + */ protected function createCropPoint() { $cropWidth = $this->calculateCropWidth(); @@ -56,6 +93,11 @@ protected function createCropPoint() return new Point(round($cropWidth), round($cropHeight)); } + /** + * Calculates crop point start width + * + * @return int + */ protected function calculateCropWidth() { $imageWidth = $this->getImage()->getSize()->getWidth(); @@ -66,9 +108,14 @@ protected function calculateCropWidth() $cropWidth = ($imageWidth / 2) - ($this->getWidth() / 2); - return $cropWidth; + return (int) $cropWidth; } + /** + * Calculates crop point start height + * + * @return int + */ protected function calculateCropHeight() { $imageHeight = $this->getImage()->getSize()->getHeight(); @@ -80,6 +127,6 @@ protected function calculateCropHeight() $cropHeight = ($imageHeight / 2) - ($this->getHeight() / 2); - return $cropHeight; + return (int) $cropHeight; } } \ No newline at end of file diff --git a/src/Operation/ResizeOperation.php b/src/Operation/ResizeOperation.php index 1286d24..1d7c00f 100644 --- a/src/Operation/ResizeOperation.php +++ b/src/Operation/ResizeOperation.php @@ -6,7 +6,7 @@ use Todstoychev\Icr\Exception\ResizeRatioException; /** - * ResizeOperation + * Performs resize operation * * @author Todor Todorov * @package Todstoychev\Icr\Operation; @@ -14,6 +14,9 @@ class ResizeOperation extends AbstractOperation { + /** + * @inheritdoc + */ public function doAction() { $this->getImage()->resize($this->createBox()); @@ -21,6 +24,12 @@ public function doAction() return $this; } + /** + * Calculates resize ratio + * + * @return float + * @throws ResizeRatioException + */ protected function calculateRatio() { $widthRatio = $this->getImage()->getSize()->getWidth() / $this->getWidth(); @@ -35,16 +44,31 @@ protected function calculateRatio() return $ratio; } + /** + * Calculates output image width + * + * @return float + * @throws ResizeRatioException + */ protected function calculateWidth() { return $this->getImage()->getSize()->getWidth() / $this->calculateRatio(); } + /** + * Calculates output image height + * + * @return float + * @throws ResizeRatioException + */ protected function calculateHeight() { return $this->getImage()->getSize()->getHeight() / $this->calculateRatio(); } + /** + * @inheritdoc + */ protected function createBox() { return new Box($this->calculateWidth(), $this->calculateHeight()); diff --git a/src/Operation/ScaleOperation.php b/src/Operation/ScaleOperation.php index f02918b..70f7e30 100644 --- a/src/Operation/ScaleOperation.php +++ b/src/Operation/ScaleOperation.php @@ -4,9 +4,18 @@ use Imagine\Image\Box; +/** + * Performs scale operation + * + * @author Todor Todorov + * @package Todstoychev\Icr\Operation + */ class ScaleOperation extends AbstractOperation { + /** + * @inheritdoc + */ public function doAction() { $this->getImage()->resize($this->createBox()); @@ -14,6 +23,9 @@ public function doAction() return $this; } + /** + * @inheritdoc + */ protected function createBox() { return new Box($this->getWidth(), $this->getHeight()); diff --git a/src/Processor.php b/src/Processor.php index d2a2ef8..42351d0 100644 --- a/src/Processor.php +++ b/src/Processor.php @@ -7,6 +7,12 @@ use Todstoychev\Icr\Handler; use Todstoychev\Icr\Reader\DirectoryTreeReader; +/** + * Used to perform main operations + * + * @author Todor Todorov + * @package Todstoychev\Icr + */ class Processor { /** @@ -39,6 +45,14 @@ class Processor */ protected $directoryTreeReader; + /** + * @param Handler\ConfigurationValidationHandler $configurationValidationHandler + * @param Handler\DirectoryHandler $directoryHandler + * @param Handler\UploadedFileHandler $uploadedFileHandler + * @param Handler\OpenImageHandler $openImageHandler + * @param Handler\DeleteImageHandler $deleteImageHandler + * @param DirectoryTreeReader $directoryTreeReader + */ public function __construct( Handler\ConfigurationValidationHandler $configurationValidationHandler, Handler\DirectoryHandler $directoryHandler, @@ -175,6 +189,13 @@ public function setDirectoryTreeReader(DirectoryTreeReader $directoryTreeReader) return $this; } + /** + * Handles image upload operation + * + * @param UploadedFile $uploadedFile + * @param string $context + * @return \Exception + */ public function upload(UploadedFile $uploadedFile, $context) { try { @@ -188,12 +209,25 @@ public function upload(UploadedFile $uploadedFile, $context) } } + /** + * Handles image delete operation + * + * @param string $fileName + * @param string $context + * @throws Exception\NonExistingContextException + */ public function delete($fileName, $context) { $this->getConfigurationValidationHandler()->validateContext($context); $this->getDeleteImageHandler()->deleteImage($context, $fileName); } + /** + * Handles image rebuilding for particular context + * + * @param string $context + * @throws Exception\NonExistingArrayKeyException + */ public function rebuild($context) { $this->getDirectoryHandler()->deleteContextFilesAndDirectories($context)->checkAndCreateDirectories($context); @@ -209,6 +243,16 @@ public function rebuild($context) } } + /** + * Handles original image uploading process + * + * @param UploadedFile $uploadedFile + * @param string $context + * + * @return string + * @throws Exception\InvalidConfigurationValueException + * @throws Exception\NonExistingContextException + */ protected function uploadImage(UploadedFile $uploadedFile, $context) { // Validate configuration data @@ -228,6 +272,12 @@ protected function uploadImage(UploadedFile $uploadedFile, $context) return $fileName; } + /** + * Processes single image + * + * @param string $context + * @param string $fileName + */ protected function processImage($context, $fileName) { $config = $this->getOpenImageHandler()->getConfig(); @@ -256,6 +306,13 @@ protected function processImage($context, $fileName) } } + /** + * Creates operation class name. Used to determine dynamic the operation class name. + * + * @param string $operation + * + * @return string + */ protected function createOperationClassName($operation) { $array = explode('-', $operation); diff --git a/src/Reader/DirectoryTreeReader.php b/src/Reader/DirectoryTreeReader.php index 07f8d2f..59ac6a5 100644 --- a/src/Reader/DirectoryTreeReader.php +++ b/src/Reader/DirectoryTreeReader.php @@ -2,6 +2,12 @@ namespace Todstoychev\Icr\Reader; +/** + * Directory tree reader. Used to get directory and file names. + * + * @author Todor Todorov + * @package Todstoychev\Icr\Reader + */ class DirectoryTreeReader { /** diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index aead414..1c13d92 100755 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -8,12 +8,16 @@ use Todstoychev\Icr\Handler; use Todstoychev\Icr\Reader\DirectoryTreeReader; +/** + * Service provider class + * + * @author Todor Todorov + * @package Todstoychev\Icr + */ class ServiceProvider extends BaseServiceProvider { /** * Bootstrap the application services. - * - * @return void */ public function boot() { @@ -21,9 +25,7 @@ public function boot() } /** - * Register the application services. - * - * @return void + * @inheritdoc */ public function register() { @@ -99,6 +101,9 @@ public function register() $this->commands(['icr.rebuild.command']); } + /** + * @inheritdoc + */ public function provides() { return ['icr.rebuild.command']; diff --git a/src/StaticData/Drivers.php b/src/StaticData/Drivers.php index f5b80c7..88113d9 100644 --- a/src/StaticData/Drivers.php +++ b/src/StaticData/Drivers.php @@ -3,7 +3,8 @@ namespace Todstoychev\Icr\StaticData; /** - * Class Drivers + * Represents available image resize drivers + * * @package Todstoychev\Icr\StaticData * @author Todor Todorov */ diff --git a/src/StaticData/Operations.php b/src/StaticData/Operations.php index ec1b046..45bba30 100644 --- a/src/StaticData/Operations.php +++ b/src/StaticData/Operations.php @@ -3,7 +3,7 @@ namespace Todstoychev\Icr\StaticData; /** - * Represent operations + * Represent available operation names * * @author Todor Todorov * @package Todstoychev\Icr\StaticData