Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Added declare strict types
Browse files Browse the repository at this point in the history
  • Loading branch information
geerteltink committed Dec 12, 2017
1 parent 109b43a commit 2944122
Show file tree
Hide file tree
Showing 50 changed files with 100 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bin/clear-config-cache.php
Expand Up @@ -9,6 +9,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

chdir(__DIR__ . '/../');

require 'vendor/autoload.php';
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/dependencies.global.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Application;
use Zend\Expressive\Container;
use Zend\Expressive\Delegate;
Expand Down
3 changes: 2 additions & 1 deletion config/autoload/development.local.php.dist
@@ -1,5 +1,4 @@
<?php

/**
* Development-only configuration.
*
Expand All @@ -10,5 +9,7 @@
* `composer development-enable`.
*/

declare(strict_types=1);

return [
];
3 changes: 2 additions & 1 deletion config/autoload/local.php.dist
@@ -1,11 +1,12 @@
<?php

/**
* Local configuration.
*
* Copy this file to `local.php` and change its settings as required.
* `local.php` is ignored by git and safe to use for local and sensitive data like usernames and passwords.
*/

declare(strict_types=1);

return [
];
2 changes: 2 additions & 0 deletions config/autoload/zend-expressive.global.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\ConfigAggregator\ConfigAggregator;

return [
Expand Down
2 changes: 2 additions & 0 deletions config/config.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\ConfigAggregator\ArrayProvider;
use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregator\PhpFileProvider;
Expand Down
3 changes: 2 additions & 1 deletion config/development.config.php.dist
@@ -1,5 +1,4 @@
<?php

/**
* File required to allow enablement of development mode.
*
Expand All @@ -21,6 +20,8 @@
* - Configuration caching is _disabled_.
*/

declare(strict_types=1);

use Zend\ConfigAggregator\ConfigAggregator;

return [
Expand Down
2 changes: 2 additions & 0 deletions config/pipeline.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Helper\ServerUrlMiddleware;
use Zend\Expressive\Helper\UrlHelperMiddleware;
use Zend\Expressive\Middleware\ImplicitHeadMiddleware;
Expand Down
2 changes: 2 additions & 0 deletions public/index.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

// Delegate static file requests back to the PHP built-in webserver
if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) {
return false;
Expand Down
2 changes: 2 additions & 0 deletions src/App/src/Action/HomePageAction.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Action;

use Interop\Http\ServerMiddleware\DelegateInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/App/src/Action/HomePageFactory.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Action;

use Psr\Container\ContainerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/App/src/Action/PingAction.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Action;

use Interop\Http\ServerMiddleware\DelegateInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/OptionalPackages.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstaller;

use Composer\Composer;
Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\AuraDi\Config\Config;
use Zend\AuraDi\Config\ContainerFactory;

Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/container-auryn.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Northwoods\Container\InjectorBuilder;
use Northwoods\Container\Config;
use Psr\Container\ContainerInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/container-pimple.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Pimple\Config\Config;
use Zend\Pimple\Config\ContainerFactory;

Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/container-sf-di.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use JSoumelidis\SymfonyDI\Config\Config;
use JSoumelidis\SymfonyDI\Config\ContainerFactory;

Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\ServiceManager\Config;
use Zend\ServiceManager\ServiceManager;

Expand Down
@@ -1,5 +1,4 @@
<?php

/**
* Development-only configuration.
*
Expand All @@ -10,6 +9,8 @@
* `composer development-enable`.
*/

declare(strict_types=1);

use Zend\Expressive\Container;
use Zend\Expressive\Middleware\ErrorResponseGenerator;

Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Router\AuraRouter;
use Zend\Expressive\Router\RouterInterface;

Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Router\FastRouteRouter;
use Zend\Expressive\Router\RouterInterface;

Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Router\RouterInterface;
use Zend\Expressive\Router\ZendRouter;

Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/routes-full.php
Expand Up @@ -26,6 +26,8 @@
* );
*/

declare(strict_types=1);

/** @var \Zend\Expressive\Application $app */

$app->get('/', App\Action\HomePageAction::class, 'home');
Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/routes-minimal.php
Expand Up @@ -13,4 +13,6 @@
* $app->route('/contact', App\Action\ContactAction::class, ['GET', 'POST', ...], 'contact');
*/

declare(strict_types=1);

/** @var \Zend\Expressive\Application $app */
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/templates-plates.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Plates\PlatesRendererFactory;
use Zend\Expressive\Template\TemplateRendererInterface;

Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/config/templates-twig.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Template\TemplateRendererInterface;
use Zend\Expressive\Twig\TwigEnvironmentFactory;
use Zend\Expressive\Twig\TwigRendererFactory;
Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Zend\Expressive\Template\TemplateRendererInterface;
use Zend\Expressive\ZendView\HelperPluginManagerFactory;
use Zend\Expressive\ZendView\ZendViewRendererFactory;
Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/Resources/src/ConfigProvider.flat.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App;

/**
Expand Down
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/ExpressiveInstaller/config.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'packages' => [
'filp/whoops' => '^2.1.12',
Expand Down
2 changes: 2 additions & 0 deletions test/AppTest/Action/HomePageActionTest.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace AppTest\Action;

use App\Action\HomePageAction;
Expand Down
2 changes: 2 additions & 0 deletions test/AppTest/Action/HomePageFactoryTest.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace AppTest\Action;

use App\Action\HomePageAction;
Expand Down
2 changes: 2 additions & 0 deletions test/AppTest/Action/PingActionTest.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace AppTest\Action;

use App\Action\PingAction;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/AddPackageTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use Composer\Package\BasePackage;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/ContainersTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use Aura\Di\Container as AuraContainer;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/CopyResourceTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use org\bovigo\vfs\vfsStream;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/ErrorHandlerTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/OptionalPackagesTestCase.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use Composer\Composer;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/ProcessAnswersTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/ProjectSandboxTrait.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-installer/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use App\Action\HomePageAction;
Expand Down
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/RemoveDevDependenciesTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/RemoveInstallerTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/RemoveLineFromStringTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down
2 changes: 2 additions & 0 deletions test/ExpressiveInstallerTest/RequestInstallTypeTest.php
Expand Up @@ -5,6 +5,8 @@
* @license https://github.com/zendframework/zend-expressive-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

namespace ExpressiveInstallerTest;

use ExpressiveInstaller\OptionalPackages;
Expand Down

0 comments on commit 2944122

Please sign in to comment.