Skip to content

Commit

Permalink
Fixed 3.next merge
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Dec 29, 2019
1 parent adbe618 commit 4c473ba
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 705 deletions.
5 changes: 3 additions & 2 deletions src/Database/Expression/TupleComparison.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ protected function _stringifyValues(ValueBinder $generator): string
if ($isMultiOperation) {
$bound = [];
foreach ($value as $k => $val) {
$valType = $multiType && isset($type[$k]) ? $type[$k] : $type;
$bound[] = $this->_bindValue($generator, $val, $valType);
/** @var string $valType */
$valType = $type && isset($type[$k]) ? $type[$k] : $type;
$bound[] = $this->_bindValue($val, $generator, $valType);
}

$values[] = sprintf('(%s)', implode(',', $bound));
Expand Down
5 changes: 4 additions & 1 deletion src/I18n/Parser/PoFileParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function parse(string $resource): array
} elseif (substr($line, 0, 7) === 'msgid "') {
// We start a new msg so save previous
$this->_addMessage($messages, $item);
/** @psalm-suppress InvalidArrayOffset */
$item['ids']['singular'] = substr($line, 7, -1);
$stage = ['ids', 'singular'];
} elseif (substr($line, 0, 8) === 'msgstr "') {
Expand All @@ -108,7 +109,7 @@ public function parse(string $resource): array
case 2:
/**
* @psalm-suppress PossiblyUndefinedArrayOffset
* @psalm-suppress PossiblyInvalidArrayOffset
* @psalm-suppress InvalidArrayOffset
* @psalm-suppress PossiblyNullArrayAccess
*/
$item[$stage[0]][$stage[1]] .= substr($line, 1, -1);
Expand All @@ -117,13 +118,15 @@ public function parse(string $resource): array
case 1:
/**
* @psalm-suppress PossiblyUndefinedArrayOffset
* @psalm-suppress InvalidArrayOffset
* @psalm-suppress PossiblyInvalidOperand
* @psalm-suppress PossiblyNullOperand
*/
$item[$stage[0]] .= substr($line, 1, -1);
break;
}
} elseif (substr($line, 0, 14) === 'msgid_plural "') {
/** @psalm-suppress InvalidArrayOffset */
$item['ids']['plural'] = substr($line, 14, -1);
$stage = ['ids', 'plural'];
} elseif (substr($line, 0, 7) === 'msgstr[') {
Expand Down
39 changes: 0 additions & 39 deletions src/TestSuite/MockBuilder.php

This file was deleted.

70 changes: 0 additions & 70 deletions src/TestSuite/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,76 +783,6 @@ protected function skipUnless($condition, $message = '')

// phpcs:enable

/**
* @inheritDoc
*/
public function getMockBuilder($className)
{
return new MockBuilder($this, $className);
}

/**
* @inheritDoc
*/
protected function getMockClass(
$originalClassName,
$methods = [],
array $arguments = [],
$mockClassName = '',
$callOriginalConstructor = false,
$callOriginalClone = true,
$callAutoload = true,
$cloneArguments = false
) {
$errorLevel = error_reporting();
error_reporting(E_ALL ^ E_DEPRECATED);
try {
return parent::getMockClass(
$originalClassName,
$methods,
$arguments,
$mockClassName,
$callOriginalConstructor,
$callOriginalClone,
$callAutoload,
$cloneArguments
);
} finally {
error_reporting($errorLevel);
}
}

/**
* @inheritDoc
*/
protected function getMockForAbstractClass(
$originalClassName,
array $arguments = [],
$mockClassName = '',
$callOriginalConstructor = true,
$callOriginalClone = true,
$callAutoload = true,
$mockedMethods = [],
$cloneArguments = false
) {
$errorLevel = error_reporting();
error_reporting(E_ALL ^ E_DEPRECATED);
try {
return parent::getMockForAbstractClass(
$originalClassName,
$arguments,
$mockClassName,
$callOriginalConstructor,
$callOriginalClone,
$callAutoload,
$mockedMethods,
$cloneArguments
);
} finally {
error_reporting($errorLevel);
}
}

/**
* Mock a model, maintain fixtures and table association
*
Expand Down
Loading

0 comments on commit 4c473ba

Please sign in to comment.