Skip to content

Commit

Permalink
PHP 5.3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed May 4, 2015
1 parent 56ca316 commit d2155fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/PlaceholderMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function findInvalidPlaceholdersNames(array $placeholders, array $
$invalidPlaceholderNames = array_intersect($placeholders, $contextKeys);

$invalidPlaceholderNames = array_filter($invalidPlaceholderNames, function ($placeholder) {
return !self::isValidPlaceholderName($placeholder);
return !PlaceholderMethods::isValidPlaceholderName($placeholder);
});

return $invalidPlaceholderNames;
Expand Down
4 changes: 4 additions & 0 deletions src/PhpUnit/MessageTypeConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class MessageTypeConstraint extends Constraint
{
protected function matches($other)
{
if (is_array($other)) {
return false;
}

$canCastToString = true;

set_error_handler(function () use (&$canCastToString) {
Expand Down

0 comments on commit d2155fb

Please sign in to comment.