From 116b8cb878e84611a5e4b03e9158a77a89905d13 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 28 Oct 2024 00:36:25 +0530 Subject: [PATCH] Use strict typing --- .github/workflows/test.yaml | 2 +- .php-cs-fixer.dist.php | 1 + src/Api/Api.php | 2 ++ src/Api/ApiInterface.php | 2 ++ src/Api/Encoder.php | 2 ++ src/Filesystem/FileNotFoundException.php | 2 ++ src/Filesystem/FilesystemException.php | 2 ++ src/Manipulators/Background.php | 2 ++ src/Manipulators/BaseManipulator.php | 2 ++ src/Manipulators/Blur.php | 2 ++ src/Manipulators/Border.php | 2 ++ src/Manipulators/Brightness.php | 2 ++ src/Manipulators/Contrast.php | 2 ++ src/Manipulators/Crop.php | 2 ++ src/Manipulators/Filter.php | 2 ++ src/Manipulators/Flip.php | 2 ++ src/Manipulators/Gamma.php | 2 ++ src/Manipulators/Helpers/Color.php | 2 ++ src/Manipulators/Helpers/Dimension.php | 2 ++ src/Manipulators/ManipulatorInterface.php | 2 ++ src/Manipulators/Orientation.php | 2 ++ src/Manipulators/Pixelate.php | 2 ++ src/Manipulators/Sharpen.php | 2 ++ src/Manipulators/Size.php | 2 ++ src/Manipulators/Watermark.php | 2 ++ src/Responses/PsrResponseFactory.php | 2 ++ src/Responses/ResponseFactoryInterface.php | 2 ++ src/Server.php | 2 ++ src/ServerFactory.php | 2 ++ src/Signatures/Signature.php | 2 ++ src/Signatures/SignatureException.php | 2 ++ src/Signatures/SignatureFactory.php | 2 ++ src/Signatures/SignatureInterface.php | 2 ++ src/Urls/UrlBuilder.php | 2 ++ src/Urls/UrlBuilderFactory.php | 2 ++ tests/Api/ApiTest.php | 2 ++ tests/Api/EncoderTest.php | 2 ++ tests/Manipulators/BackgroundTest.php | 2 ++ tests/Manipulators/BlurTest.php | 2 ++ tests/Manipulators/BorderTest.php | 2 ++ tests/Manipulators/BrightnessTest.php | 2 ++ tests/Manipulators/ContrastTest.php | 2 ++ tests/Manipulators/CropTest.php | 2 ++ tests/Manipulators/FilterTest.php | 2 ++ tests/Manipulators/FlipTest.php | 2 ++ tests/Manipulators/GammaTest.php | 2 ++ tests/Manipulators/Helpers/ColorTest.php | 2 ++ tests/Manipulators/Helpers/DimensionTest.php | 2 ++ tests/Manipulators/OrientationTest.php | 2 ++ tests/Manipulators/PixelateTest.php | 2 ++ tests/Manipulators/SharpenTest.php | 2 ++ tests/Manipulators/SizeTest.php | 2 ++ tests/Manipulators/WatermarkTest.php | 2 ++ tests/Responses/PsrResponseFactoryTest.php | 2 ++ tests/ServerFactoryTest.php | 2 ++ tests/ServerTest.php | 2 ++ tests/Signatures/SignatureFactoryTest.php | 2 ++ tests/Signatures/SignatureTest.php | 2 ++ tests/Urls/UrlBuilderFactoryTest.php | 2 ++ tests/Urls/UrlBuilderTest.php | 2 ++ 60 files changed, 118 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 68ea79e9..429983c1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -58,7 +58,7 @@ jobs: - name: php-cs-fixer run: | - vendor/bin/php-cs-fixer fix --dry-run --diff + vendor/bin/php-cs-fixer fix --dry-run --diff --allow-risky=yes static-analysis: runs-on: ubuntu-24.04 diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index a2f9d0c6..6000a764 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -8,6 +8,7 @@ return (new PhpCsFixer\Config()) ->setRules([ '@Symfony' => true, + 'declare_strict_types' => true, 'phpdoc_annotation_without_dot' => false, 'nullable_type_declaration_for_default_null_value' => [ 'use_nullable_type_declaration' => true, diff --git a/src/Api/Api.php b/src/Api/Api.php index 8c0f6624..d66a42ee 100644 --- a/src/Api/Api.php +++ b/src/Api/Api.php @@ -1,5 +1,7 @@