Skip to content

Commit

Permalink
Apply fixes from StyleCI (#11)
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
warrickbayman authored Mar 18, 2022
1 parent 93fb57d commit bdec47d
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 29 deletions.
30 changes: 15 additions & 15 deletions src/Http/Controllers/ImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class ImageController
/**
* Image response.
*
* @param Request $request
* @param string $filename
* @param Request $request
* @param string $filename
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request, string $filename)
Expand All @@ -39,9 +39,9 @@ public function __invoke(Request $request, string $filename)
/**
* Check is a file has not been modified.
*
* @param Request $request
* @param string $path
* @param array $options
* @param Request $request
* @param string $path
* @param array $options
* @return bool
*/
protected function notModified(Request $request, string $path, array $options = [])
Expand All @@ -52,7 +52,7 @@ protected function notModified(Request $request, string $path, array $options =
/**
* Get the headers to attach to the response.
*
* @param string $path
* @param string $path
* @return array
*/
protected function responseHeaders(string $path, array $options = [])
Expand All @@ -71,7 +71,7 @@ protected function responseHeaders(string $path, array $options = [])
/**
* Get the E-Tag from the last modified date of the file.
*
* @param string $path
* @param string $path
* @return string
*/
protected function getETag(string $path, array $options = [])
Expand All @@ -82,8 +82,8 @@ protected function getETag(string $path, array $options = [])
/**
* Get an MD5 hash of the files last modification time and the query string.
*
* @param string $path
* @param array $options
* @param string $path
* @param array $options
* @return string
*/
protected function hash(string $path, array $options = [])
Expand All @@ -96,7 +96,7 @@ protected function hash(string $path, array $options = [])
/**
* Get the file URI.
*
* @param string $filename
* @param string $filename
* @return string
*/
protected function getFilePath(string $filename): string
Expand All @@ -112,7 +112,7 @@ protected function getFilePath(string $filename): string
/**
* Check if a file exists.
*
* @param string $path
* @param string $path
* @return bool
*/
protected function fileExists(string $path)
Expand All @@ -123,8 +123,8 @@ protected function fileExists(string $path)
/**
* Response for missing files.
*
* @param Request $request
* @param string $filename
* @param Request $request
* @param string $filename
*/
protected function sendMissingFileResponse(Request $request, string $filename)
{
Expand All @@ -136,8 +136,8 @@ protected function sendMissingFileResponse(Request $request, string $filename)
/**
* Get a rendered image response.
*
* @param string $path
* @param array $options
* @param string $path
* @param array $options
* @return \Illuminate\Http\Response
*/
protected function render(string $path, array $options = [])
Expand Down
20 changes: 11 additions & 9 deletions src/ImageRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function __construct()
/**
* Register a new transformer class.
*
* @param string $key
* @param string $class
* @param string $key
* @param string $class
*/
public function addTransformer(string $key, string $class): void
{
Expand All @@ -46,9 +46,10 @@ public function addTransformer(string $key, string $class): void
/**
* Render the image.
*
* @param string $path
* @param array $options
* @param string $path
* @param array $options
* @return Image|string
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function render(string $path, array $options = [])
Expand All @@ -65,8 +66,8 @@ public function render(string $path, array $options = [])
/**
* Prepare the image for output.
*
* @param string $path
* @param array $options
* @param string $path
* @param array $options
* @return Image
*/
protected function prepareImage(string $path, array $options = []): Image
Expand All @@ -85,8 +86,8 @@ protected function prepareImage(string $path, array $options = []): Image
/**
* Transform an image.
*
* @param ImageCache $image
* @param array $options
* @param ImageCache $image
* @param array $options
* @return ImageCache
*/
protected function transform(ImageCache $image, array $options)
Expand All @@ -107,8 +108,9 @@ protected function transform(ImageCache $image, array $options)
/**
* Get image data.
*
* @param string $path
* @param string $path
* @return string
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
protected function imageData(string $path)
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/Contracts/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Transformer
* The transformer.
*
* @param $image
* @param array $values
* @param array $values
* @return mixed
*/
public function handle($image, array $values);
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/HeightTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HeightTransformer implements Transformer
* The transformer.
*
* @param $image
* @param array $values
* @param array $values
* @return mixed
*/
public function handle($image, array $values)
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/SquareTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SquareTransformer implements Transformer
* The transformer.
*
* @param $image
* @param array $values
* @param array $values
* @return mixed
*/
public function handle($image, array $values)
Expand Down
2 changes: 1 addition & 1 deletion src/Transformers/WidthTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class WidthTransformer implements Transformer
* The transformer.
*
* @param $image
* @param array $values
* @param array $values
* @return mixed
*/
public function handle($image, array $values)
Expand Down
2 changes: 1 addition & 1 deletion tests/Transformers/CustomTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CustomTransformer implements Transformer
* The transformer.
*
* @param $image
* @param array $values
* @param array $values
* @return mixed
*/
public function handle($image, array $values)
Expand Down

0 comments on commit bdec47d

Please sign in to comment.