Skip to content

Commit dd85221

Browse files
committed
Namespace all functions.
Add global versions if not already defined.
1 parent 343165d commit dd85221

12 files changed

+20
-0
lines changed

Client/Adapter/Mock.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Closure;
2222
use InvalidArgumentException;
2323
use Psr\Http\Message\RequestInterface;
24+
use function Cake\Core\getTypeName;
2425

2526
/**
2627
* Implements sending requests to an array of stubbed responses

ControllerFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
declare(strict_types=1);
33

4+
use function Cake\Core\deprecationWarning;
5+
46
deprecationWarning(
57
'Since 4.2.0: Cake\Http\ControllerFactory is deprecated. ' .
68
'Use Cake\Controller\ControllerFactory instead.'

Cookie/Cookie.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use DateTimeInterface;
2121
use DateTimeZone;
2222
use InvalidArgumentException;
23+
use function Cake\Core\deprecationWarning;
24+
use function Cake\Core\getTypeName;
2325

2426
/**
2527
* Cookie object to build a cookie and turn it into a header value

Cookie/CookieCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
use Psr\Http\Message\ServerRequestInterface;
2828
use Traversable;
2929
use TypeError;
30+
use function Cake\Core\getTypeName;
31+
use function Cake\Core\triggerWarning;
3032

3133
/**
3234
* Cookie Collection

Exception/RedirectException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717
namespace Cake\Http\Exception;
1818

19+
use function Cake\Core\deprecationWarning;
20+
1921
/**
2022
* An exception subclass used by routing and application code to
2123
* trigger a redirect.

FlashMessage.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
use Cake\Core\InstanceConfigTrait;
2020
use Throwable;
21+
use function Cake\Core\pluginSplit;
2122

2223
/**
2324
* The FlashMessage class provides a way for you to write a flash variable

Middleware/CsrfProtectionMiddleware.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
use Psr\Http\Server\MiddlewareInterface;
3030
use Psr\Http\Server\RequestHandlerInterface;
3131
use RuntimeException;
32+
use function Cake\Core\deprecationWarning;
33+
use function Cake\I18n\__d;
3234

3335
/**
3436
* Provides CSRF protection & validation.

Middleware/DoublePassDecoratorMiddleware.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Psr\Http\Message\ServerRequestInterface;
2222
use Psr\Http\Server\MiddlewareInterface;
2323
use Psr\Http\Server\RequestHandlerInterface;
24+
use function Cake\Core\deprecationWarning;
2425

2526
/**
2627
* Decorate double-pass middleware as PSR-15 middleware.

Middleware/SessionCsrfProtectionMiddleware.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use Psr\Http\Server\MiddlewareInterface;
2727
use Psr\Http\Server\RequestHandlerInterface;
2828
use RuntimeException;
29+
use function Cake\I18n\__d;
2930

3031
/**
3132
* Provides CSRF protection via session based tokens.

Response.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
use Psr\Http\Message\ResponseInterface;
3030
use Psr\Http\Message\StreamInterface;
3131
use SplFileInfo;
32+
use function Cake\Core\deprecationWarning;
33+
use function Cake\Core\env;
34+
use function Cake\I18n\__d;
3235

3336
/**
3437
* Responses contain the response text, status and headers of a HTTP response.

0 commit comments

Comments
 (0)