apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -14,7 +14,6 @@ namespace Chill\Migrations\Report;
use Chill\MainBundle\Entity\Scope;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use RuntimeException;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -28,7 +27,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -38,11 +37,10 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
$this->addSql('ALTER TABLE Report DROP scope_id');
}
public function setContainer(?ContainerInterface $container = null)
public function setContainer(ContainerInterface $container = null)
{
if (null === $container) {
throw new RuntimeException('Container is not provided. This migration '
. 'need container to set a default center');
throw new \RuntimeException('Container is not provided. This migration need container to set a default center');
}
$this->container = $container;
@@ -51,7 +49,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -101,10 +99,10 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
}
}*/
$this->addSql('ALTER TABLE report DROP scope'); //before this migration, scope was never used
$this->addSql('ALTER TABLE report DROP scope'); // before this migration, scope was never used
$this->addSql('ALTER TABLE report ADD CONSTRAINT FK_report_scope '
. 'FOREIGN KEY (scope_id) '
. 'REFERENCES scopes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
.'FOREIGN KEY (scope_id) '
.'REFERENCES scopes (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
if (isset($defaultScopeId)) {
$this->addSql('UPDATE report SET scope_id = :id', [