Skip to content

Commit

Permalink
Use strict typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Oct 27, 2024
1 parent 26af6ff commit 116b8cb
Show file tree
Hide file tree
Showing 60 changed files with 118 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/Api/Api.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Api;

use Intervention\Image\Decoders\BinaryImageDecoder;
Expand Down
2 changes: 2 additions & 0 deletions src/Api/ApiInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Api;

interface ApiInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Api/Encoder.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Api;

use Intervention\Image\Interfaces\EncodedImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Filesystem/FileNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Filesystem;

class FileNotFoundException extends \Exception
Expand Down
2 changes: 2 additions & 0 deletions src/Filesystem/FilesystemException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Filesystem;

class FilesystemException extends \Exception
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Background.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/BaseManipulator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Blur.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Border.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Geometry\Factories\RectangleFactory;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Brightness.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Contrast.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Crop.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Filter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Flip.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Gamma.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Helpers/Color.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators\Helpers;

class Color
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Helpers/Dimension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators\Helpers;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/ManipulatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Orientation.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Pixelate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Sharpen.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Size.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Geometry\Rectangle;
Expand Down
2 changes: 2 additions & 0 deletions src/Manipulators/Watermark.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Responses/PsrResponseFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Responses;

use League\Flysystem\FilesystemOperator;
Expand Down
2 changes: 2 additions & 0 deletions src/Responses/ResponseFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Responses;

use League\Flysystem\FilesystemOperator;
Expand Down
2 changes: 2 additions & 0 deletions src/Server.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide;

use League\Flysystem\FilesystemException as FilesystemV2Exception;
Expand Down
2 changes: 2 additions & 0 deletions src/ServerFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide;

use Intervention\Image\ImageManager;
Expand Down
2 changes: 2 additions & 0 deletions src/Signatures/Signature.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Signatures;

class Signature implements SignatureInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Signatures/SignatureException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Signatures;

class SignatureException extends \Exception
Expand Down
2 changes: 2 additions & 0 deletions src/Signatures/SignatureFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Signatures;

class SignatureFactory
Expand Down
2 changes: 2 additions & 0 deletions src/Signatures/SignatureInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Signatures;

interface SignatureInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Urls/UrlBuilder.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Urls;

use League\Glide\Signatures\SignatureInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/Urls/UrlBuilderFactory.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Urls;

use League\Glide\Signatures\SignatureFactory;
Expand Down
2 changes: 2 additions & 0 deletions tests/Api/ApiTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Api;

use Intervention\Image\ImageManager;
Expand Down
2 changes: 2 additions & 0 deletions tests/Api/EncoderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Api;

use Intervention\Image\Encoders\MediaTypeEncoder;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/BackgroundTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\DriverInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/BlurTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/BorderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Geometry\Factories\RectangleFactory;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/BrightnessTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/ContrastTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/CropTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/FilterTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/FlipTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/GammaTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/Helpers/ColorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators\Helpers;

use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/Helpers/DimensionTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators\Helpers;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Manipulators/OrientationTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace League\Glide\Manipulators;

use Intervention\Image\Interfaces\ImageInterface;
Expand Down
Loading

0 comments on commit 116b8cb

Please sign in to comment.