-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix BC for #6890 #6924
fix BC for #6890 #6924
Conversation
@@ -10,6 +10,12 @@ | |||
namespace Zend\Db\Sql\Platform; | |||
|
|||
use Zend\Db\Adapter\AdapterInterface; | |||
use Zend\Db\Adapter\Platform\PlatformInterface; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
Who can say why tests is failed? |
it's cs, there is travis build error :
You can fix with php-cs-fixer :
php-cs-fixer fix tests/ZendTest/Db/Sql/Platform/PlatformTest.php --fixers=braces
|
|
||
$mockDriver = $this->getMock('Zend\Db\Adapter\Driver\DriverInterface'); | ||
$mockDriver->expects($this->any())->method('formatParameterName')->will($this->returnValue('?')); | ||
$mockDriver->expects($this->any())->method('createStatement')->will($this->returnCallback(function () {return new Adapter\StatementContainer;})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually here, psr-2 for closure : https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#6-closures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the easiest way is to use php-cs-fixer :
php-cs-fixer fix tests/ZendTest/Db/Sql/Platform/PlatformTest.php --fixers=braces
@samsonasik Thank you! Problem was with new parameters, but with old version of |
return $decorator; | ||
} | ||
foreach ($this->decorators as $type => $decorator) { | ||
if ($subject instanceof $type && is_a($decorator, $type, true)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need is_a()
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember - it was a long time ago.
This does not necessary and can be replaced to instanceof
.
Do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@turrsis instanceof
is sufficient: I'll fix on merge.
This is reorganize of #6890 and c91bd9b.
Because
defaultPlatform
is realy BC and don't required inZend\Db\Sql\Platform\*
classes