Skip to content

Commit

Permalink
Apply fixes from StyleCI (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
takeit committed Dec 5, 2017
1 parent 008d0a2 commit 7355107
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/migrations/Version20171017090729.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version20171017090729 extends AbstractMigration
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('CREATE SEQUENCE sylius_payment_method_translation_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE ph_subscription_item_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
Expand Down Expand Up @@ -56,7 +56,7 @@ public function up(Schema $schema)
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE sylius_payment_method_translation DROP CONSTRAINT FK_966BE3A12C2AC5D3');
$this->addSql('ALTER TABLE ph_payment DROP CONSTRAINT FK_8E3A744B19883967');
Expand Down
4 changes: 2 additions & 2 deletions app/migrations/Version20171030154049.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version20171030154049 extends AbstractMigration
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE ph_subscription ADD method_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE ph_subscription ADD CONSTRAINT FK_98E208AC19883967 FOREIGN KEY (method_id) REFERENCES ph_payment_method (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
Expand All @@ -29,7 +29,7 @@ public function up(Schema $schema)
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE ph_subscription DROP CONSTRAINT FK_98E208AC19883967');
$this->addSql('DROP INDEX IDX_98E208AC19883967');
Expand Down
4 changes: 2 additions & 2 deletions app/migrations/Version20171106124956.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version20171106124956 extends AbstractMigration
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE ph_subscription ADD metadata JSON NOT NULL');
}
Expand All @@ -27,7 +27,7 @@ public function up(Schema $schema)
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->skipIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE ph_subscription DROP metadata');
}
Expand Down
4 changes: 2 additions & 2 deletions app/migrations/Version20171117114724.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Version20171117114724 extends AbstractMigration
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE sylius_payment_method_translation (id INT AUTO_INCREMENT NOT NULL, translatable_id INT NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, instructions LONGTEXT DEFAULT NULL, locale VARCHAR(255) NOT NULL, INDEX IDX_966BE3A12C2AC5D3 (translatable_id), UNIQUE INDEX sylius_payment_method_translation_uniq_trans (translatable_id, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE ph_subscription_item (id INT AUTO_INCREMENT NOT NULL, subscription_id INT NOT NULL, quantity INT NOT NULL, unit_price INT NOT NULL, total INT NOT NULL, INDEX IDX_21A30BA19A1887DC (subscription_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
Expand All @@ -40,7 +40,7 @@ public function up(Schema $schema)
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('ALTER TABLE ph_subscription_item DROP FOREIGN KEY FK_21A30BA19A1887DC');
$this->addSql('ALTER TABLE ph_payment DROP FOREIGN KEY FK_8E3A744B9A1887DC');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function onPostExecute(Context $context)
return;
}

if ($previousStackSize === 1) {
if (1 === $previousStackSize) {
$previousActionClassName = get_class($previousStack[0]->getAction());
if (false === stripos($previousActionClassName, 'NotifyNullAction')) {
return;
Expand Down
4 changes: 2 additions & 2 deletions var/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsenc
*
* @param RequirementCollection $collection A RequirementCollection instance
*/
public function addCollection(RequirementCollection $collection)
public function addCollection(self $collection)
{
$this->requirements = array_merge($this->requirements, $collection->all());
}
Expand Down Expand Up @@ -731,7 +731,7 @@ function_exists('posix_isatty'),
'Install and/or enable a <strong>PHP accelerator</strong> (highly recommended).'
);

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) {
$this->addRecommendation(
$this->getRealpathCacheSize() >= 5 * 1024 * 1024,
'realpath_cache_size should be at least 5M in php.ini',
Expand Down

0 comments on commit 7355107

Please sign in to comment.