Skip to content

Commit

Permalink
Merge pull request #144 from gyKa/fix-scrutinizer
Browse files Browse the repository at this point in the history
Fix Scrutinizer issues.
  • Loading branch information
saimaz committed Feb 9, 2015
2 parents 64364eb + 9958c81 commit 118a64d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Pipeline/Pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function setName($name)
/**
* Counts number of items in the services.
*
* @param array[] $sources
* @param \Traversable[]|array[] $sources
*
* @return int
*/
Expand Down
20 changes: 14 additions & 6 deletions Sync/DiffProvider/Binlog/BinlogDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ protected function retrieveMapping($table)
/**
* Applies associative mapping to numbered columns.
*
* @param array $params
* @param array $mapping
* @param array $params
* @param array|bool $mapping
*
* @return array
*/
Expand Down Expand Up @@ -157,13 +157,21 @@ public function current()
$mapping = $this->getTableMapping($diffItem->getCategory());

if (isset($buffer[BinlogParser::PARAM_QUERY]['where'])) {
$where = $buffer[BinlogParser::PARAM_QUERY]['where'];
$diffItem->setWhereParams($this->applyMapping($where, $mapping));
$diffItem->setWhereParams(
$this->applyMapping(
$buffer[BinlogParser::PARAM_QUERY]['where'],
$mapping
)
);
}

if (isset($buffer[BinlogParser::PARAM_QUERY]['set'])) {
$set = $buffer[BinlogParser::PARAM_QUERY]['set'];
$diffItem->setSetParams($this->applyMapping($set, $mapping));
$diffItem->setSetParams(
$this->applyMapping(
$buffer[BinlogParser::PARAM_QUERY]['set'],
$mapping
)
);
}

return $diffItem;
Expand Down

0 comments on commit 118a64d

Please sign in to comment.