Skip to content

Commit b083745

Browse files
committed
Add missing types
1 parent 3db66b0 commit b083745

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/Manipulators/BaseManipulator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class BaseManipulator implements ManipulatorInterface
2020
*
2121
* @return $this
2222
*/
23-
public function setParams(array $params)
23+
public function setParams(array $params): static
2424
{
2525
$this->params = $params;
2626

src/Manipulators/Helpers/Color.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function parseHex(string $hex): array
112112
*
113113
* @return string The formatted color.
114114
*/
115-
public function formatted()
115+
public function formatted(): string
116116
{
117117
return 'rgba('.$this->red.', '.$this->green.', '.$this->blue.', '.$this->alpha.')';
118118
}

src/Manipulators/ManipulatorInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface ManipulatorInterface
1515
*
1616
* @return $this
1717
*/
18-
public function setParams(array $params);
18+
public function setParams(array $params): static;
1919

2020
/**
2121
* Get a specific manipulation param.

src/Manipulators/Size.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function resolveMissingDimensions(ImageInterface $image, ?int $width = nu
172172
*
173173
* @return int[] The modified width and height.
174174
*/
175-
public function applyDpr(int $width, int $height, float $dpr)
175+
public function applyDpr(int $width, int $height, float $dpr): array
176176
{
177177
$width = $width * $dpr;
178178
$height = $height * $dpr;

src/Responses/PsrResponseFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(ResponseInterface $response, \Closure $streamCallbac
3939
*
4040
* @return ResponseInterface Response object.
4141
*/
42-
public function create(FilesystemOperator $cache, $path)
42+
public function create(FilesystemOperator $cache, string $path): ResponseInterface
4343
{
4444
$stream = $this->streamCallback->__invoke(
4545
$cache->readStream($path)

src/Responses/ResponseFactoryInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ interface ResponseFactoryInterface
1616
*
1717
* @return mixed The response object.
1818
*/
19-
public function create(FilesystemOperator $cache, $path);
19+
public function create(FilesystemOperator $cache, string $path);
2020
}

src/Signatures/Signature.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function validateRequest(string $path, array $params): void
6161
*
6262
* @return string The generated HTTP signature.
6363
*/
64-
public function generateSignature(string $path, array $params)
64+
public function generateSignature(string $path, array $params): string
6565
{
6666
unset($params['s']);
6767
ksort($params);

0 commit comments

Comments
 (0)