Fix #41 #42

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
@SongoQ

SongoQ commented Aug 3, 2011

No description provided.

@stof

View changes

lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php
+ }
+
+ if (isset($codeSql)) {
+ return implode("\n", array_merge($code, $codeSql));

This comment has been minimized.

Show comment Hide comment
@stof

stof Aug 3, 2011

Member

the indentation should use 4 spaces

@stof

stof Aug 3, 2011

Member

the indentation should use 4 spaces

This comment has been minimized.

Show comment Hide comment
@SongoQ

SongoQ Aug 3, 2011

ok

@stof

View changes

lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php
+ if (isset($codeSql)) {
+ return implode("\n", array_merge($code, $codeSql));
+ }
+ else {

This comment has been minimized.

Show comment Hide comment
@stof

stof Aug 3, 2011

Member

the else should be on the same line than the closing curly brace

@stof

stof Aug 3, 2011

Member

the else should be on the same line than the closing curly brace

This comment has been minimized.

Show comment Hide comment
@SongoQ

SongoQ Aug 3, 2011

ok, done. Tnx :)

@SongoQ

SongoQ Aug 3, 2011

ok, done. Tnx :)

@jwage

This comment has been minimized.

Show comment Hide comment
@jwage

jwage Oct 28, 2011

Member

I prefer this behavior but in your code you changed the variable to $codeSql but don't instantiate that array anywhere.

Member

jwage commented Oct 28, 2011

I prefer this behavior but in your code you changed the variable to $codeSql but don't instantiate that array anywhere.

@@ -99,8 +99,13 @@ EOT
if (strpos($query, $configuration->getMigrationsTableName()) !== false) {
continue;
}
- $code[] = "\$this->addSql(\"$query\");";
+ $codeSql[] = "\$this->addSql(\"$query\");";

This comment has been minimized.

Show comment Hide comment
@jwage

jwage Oct 28, 2011

Member

Where is $codeSql instantiated?

@jwage

jwage Oct 28, 2011

Member

Where is $codeSql instantiated?

This comment has been minimized.

Show comment Hide comment
@beberlei

beberlei Nov 16, 2011

Member

Yes please initialize the $codeSQL Variable and check for count() instead of isset()

@beberlei

beberlei Nov 16, 2011

Member

Yes please initialize the $codeSQL Variable and check for count() instead of isset()

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Dec 1, 2011

Member

I'd check !empty($codeSQL)

@Ocramius

Ocramius Dec 1, 2011

Member

I'd check !empty($codeSQL)

@stof

This comment has been minimized.

Show comment Hide comment
@stof

stof Aug 18, 2014

Member

Fixed in #160

Member

stof commented Aug 18, 2014

Fixed in #160

@stof stof closed this Aug 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment