Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce declare(strict_types) to force strict typing on builtin method calls #9101

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion src/Control/CLIRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/CliController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/ContentNegotiator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Controller.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Cookie.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/CookieJar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Cookie_Backend.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Director.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Email/Email.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Email;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Email/Mailer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Email;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Email/SwiftMailer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Email;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Email/SwiftPlugin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Email;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTP.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPApplication.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPRequest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPResponse.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPResponse_Exception.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HTTPStreamResponse.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/HasRequestHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
3 changes: 2 additions & 1 deletion src/Control/IPUtils.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
<?php declare(strict_types = 1);

/**
* These helpful functions were lifted from the Symfony library
* https://github.com/symfony/http-foundation/blob/master/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/AllowedHostsMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/CanonicalURLMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ChangeDetectionMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ConfirmationMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ConfirmationMiddleware/Bypass.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ConfirmationMiddleware/Rule.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ConfirmationMiddleware/Url.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\ConfirmationMiddleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/ExecMetricMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/FlushMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/HTTPCacheControlMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/HTTPMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/HTTPMiddlewareAware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/RateLimitMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/RequestHandlerMiddlewareAdapter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/SessionMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/TrustedProxyMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Middleware/URLSpecialsMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\URLSpecialsMiddleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\Middleware\URLSpecialsMiddleware;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/NestedController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/NullHTTPRequest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/PjaxResponseNegotiator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/RSS/RSSFeed.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\RSS;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/RSS/RSSFeed_Entry.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control\RSS;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/RequestFilter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/RequestHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/RequestProcessor.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/Session.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Control/SimpleResourceURLGenerator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Control;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Application.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/ApcuCacheFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/CacheFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/DefaultCacheFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/FilesystemCacheFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/ManifestCacheFactory.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Cache/MemberCacheFlusher.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);

namespace SilverStripe\Core\Cache;

Expand Down
Loading