Merge pull request #503 from acelaya-forks/feature/update-coding-standard

Feature/update coding standard
This commit is contained in:
Alejandro Celaya 2019-10-05 18:07:12 +02:00 committed by GitHub
commit 700ee40109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
312 changed files with 367 additions and 25 deletions

View File

@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
## [Unreleased]
#### Added
* *Nothing*
#### Changed
* [#458](https://github.com/shlinkio/shlink/issues/458) Updated coding styles to use [shlinkio/php-coding-standard](https://github.com/shlinkio/php-coding-standard) v2.0.0.
#### Deprecated
* *Nothing*
#### Removed
* * *Nothing*
#### Fixed
* *Nothing*
## 1.19.0 - 2019-10-05
#### Added

View File

@ -64,7 +64,7 @@
"phpunit/phpcov": "^6.0",
"phpunit/phpunit": "^8.3",
"roave/security-advisories": "dev-master",
"shlinkio/php-coding-standard": "~1.2.2",
"shlinkio/php-coding-standard": "~2.0.0",
"shlinkio/shlink-test-utils": "^1.0",
"symfony/dotenv": "^4.3",
"symfony/var-dumper": "^4.3",

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use function Shlinkio\Shlink\Common\env;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Zend\ConfigAggregator\ConfigAggregator;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Zend\Expressive;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Common;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Installer\Config\Plugin;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Common\Cache\RedisFactory;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,7 +1,8 @@
<?php
declare(strict_types=1);
/** @deprecated */
/* @deprecated */
return [
'preview_generation' => [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Zend\Expressive\Router\FastRouteRouter;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Shlinkio\Shlink\Core\Options\UrlShortenerOptions;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Doctrine\ORM\EntityManager;
@ -6,8 +7,10 @@ use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Psr\Container\ContainerInterface;
use Zend\ServiceManager\ServiceManager;
/** @var ContainerInterface|ServiceManager $container */
$container = include __DIR__ . '/container.php';
$em = $container->get(EntityManager::class);
return (function () {
/** @var ContainerInterface|ServiceManager $container */
$container = include __DIR__ . '/container.php';
$em = $container->get(EntityManager::class);
return ConsoleRunner::createHelperSet($em);
return ConsoleRunner::createHelperSet($em);
})();

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
use Symfony\Component\Dotenv\Dotenv;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\TestUtils;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\TestUtils;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkMigrations;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Config;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Config;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Db;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Db;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Db;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Visit;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Visit;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Exception;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Exception;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Factory;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Api;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Config;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Db;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Db;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\ShortUrl;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Tag;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Visit;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Visit;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Exception;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Factory;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Util;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
return [

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core;

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
@ -7,7 +8,7 @@ use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
use Doctrine\ORM\Mapping\ClassMetadata; // @codingStandardsIgnoreLine
/** @var $metadata ClassMetadata */
/** @var $metadata ClassMetadata */ // @codingStandardsIgnoreLine
$builder = new ClassMetadataBuilder($metadata);
$builder->setTable('domains');

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
@ -8,7 +9,7 @@ use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
use Doctrine\ORM\Mapping\ClassMetadata; // @codingStandardsIgnoreLine
use Shlinkio\Shlink\Common\Doctrine\Type\ChronosDateTimeType;
/** @var $metadata ClassMetadata */
/** @var $metadata ClassMetadata */ // @codingStandardsIgnoreLine
$builder = new ClassMetadataBuilder($metadata);
$builder->setTable('short_urls')

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
@ -7,7 +8,7 @@ use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
use Doctrine\ORM\Mapping\ClassMetadata; // @codingStandardsIgnoreLine
/** @var $metadata ClassMetadata */
/** @var $metadata ClassMetadata */ // @codingStandardsIgnoreLine
$builder = new ClassMetadataBuilder($metadata);
$builder->setTable('tags')

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
@ -9,7 +10,7 @@ use Doctrine\ORM\Mapping\ClassMetadata; // @codingStandardsIgnoreLine
use Shlinkio\Shlink\Common\Doctrine\Type\ChronosDateTimeType;
use Shlinkio\Shlink\Core\Model\Visitor;
/** @var $metadata ClassMetadata */
/** @var $metadata ClassMetadata */ // @codingStandardsIgnoreLine
$builder = new ClassMetadataBuilder($metadata);
$builder->setTable('visits')

Some files were not shown because too many files have changed in this diff Show More