Browse Source

Add strict_types to core and error packages.

Mark Story 7 years ago
parent
commit
f98f10c2f6
41 changed files with 42 additions and 1 deletions
  1. 1 0
      src/Core/App.php
  2. 1 0
      src/Core/BasePlugin.php
  3. 1 0
      src/Core/ClassLoader.php
  4. 1 0
      src/Core/Configure.php
  5. 1 0
      src/Core/Configure/ConfigEngineInterface.php
  6. 1 0
      src/Core/Configure/FileConfigTrait.php
  7. 1 0
      src/Core/ConsoleApplicationInterface.php
  8. 1 0
      src/Core/ConventionsTrait.php
  9. 1 0
      src/Core/Exception/Exception.php
  10. 1 0
      src/Core/Exception/MissingPluginException.php
  11. 1 0
      src/Core/HttpApplicationInterface.php
  12. 1 0
      src/Core/InstanceConfigTrait.php
  13. 1 0
      src/Core/ObjectRegistry.php
  14. 1 0
      src/Core/Plugin.php
  15. 1 0
      src/Core/PluginApplicationInterface.php
  16. 1 0
      src/Core/PluginCollection.php
  17. 1 0
      src/Core/PluginInterface.php
  18. 1 0
      src/Core/Retry/CommandRetry.php
  19. 1 0
      src/Core/Retry/RetryStrategyInterface.php
  20. 1 0
      src/Core/StaticConfigTrait.php
  21. 1 0
      src/Core/functions.php
  22. 1 0
      src/Error/BaseErrorHandler.php
  23. 1 0
      src/Error/Debugger.php
  24. 1 0
      src/Error/ErrorHandler.php
  25. 1 0
      src/Error/ExceptionRenderer.php
  26. 1 0
      src/Error/ExceptionRendererInterface.php
  27. 1 0
      src/Error/FatalErrorException.php
  28. 1 0
      src/Error/Middleware/ErrorHandlerMiddleware.php
  29. 1 0
      src/Error/PHP7ErrorException.php
  30. 1 0
      tests/TestCase/Core/AppTest.php
  31. 1 0
      tests/TestCase/Core/BasePluginTest.php
  32. 1 0
      tests/TestCase/Core/ConfigureTest.php
  33. 1 0
      tests/TestCase/Core/FunctionsTest.php
  34. 1 0
      tests/TestCase/Core/InstanceConfigTraitTest.php
  35. 2 0
      tests/TestCase/Core/PluginCollectionTest.php
  36. 1 0
      tests/TestCase/Core/PluginTest.php
  37. 1 0
      tests/TestCase/Core/StaticConfigTraitTest.php
  38. 1 0
      tests/TestCase/Error/DebuggerTest.php
  39. 1 0
      tests/TestCase/Error/ErrorHandlerTest.php
  40. 1 1
      tests/TestCase/Error/ExceptionRendererTest.php
  41. 1 0
      tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php

+ 1 - 0
src/Core/App.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/BasePlugin.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/ClassLoader.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Configure.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Configure/ConfigEngineInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Configure/FileConfigTrait.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/ConsoleApplicationInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/ConventionsTrait.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Exception/Exception.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Exception/MissingPluginException.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/HttpApplicationInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/InstanceConfigTrait.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/ObjectRegistry.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Plugin.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/PluginApplicationInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/PluginCollection.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/PluginInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright 2005-2011, Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Retry/CommandRetry.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/Retry/RetryStrategyInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/StaticConfigTrait.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Core/functions.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/BaseErrorHandler.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/Debugger.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/ErrorHandler.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * ErrorHandler class
  *

+ 1 - 0
src/Error/ExceptionRenderer.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/ExceptionRendererInterface.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/FatalErrorException.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/Middleware/ErrorHandlerMiddleware.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
src/Error/PHP7ErrorException.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/AppTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/BasePluginTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/ConfigureTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/FunctionsTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/InstanceConfigTraitTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 2 - 0
tests/TestCase/Core/PluginCollectionTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
@@ -154,6 +155,7 @@ class PluginCollectionTest extends TestCase
         $this->skipIf(file_exists($configPath), 'cakephp-plugins.php exists, skipping overwrite');
         $file = <<<PHP
 <?php
+declare(strict_types=1);
 return [
     'plugins' => [
         'TestPlugin' => '/config/path'

+ 1 - 0
tests/TestCase/Core/PluginTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Core/StaticConfigTraitTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Error/DebuggerTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Error/ErrorHandlerTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 1
tests/TestCase/Error/ExceptionRendererTest.php

@@ -1,5 +1,5 @@
 <?php
-declare(strict_types = 1);
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

+ 1 - 0
tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php

@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 /**
  * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)