Skip to content

Commit

Permalink
Change var name
Browse files Browse the repository at this point in the history
  • Loading branch information
defrag committed Apr 15, 2014
1 parent 3f5b8ef commit f085f01
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/JsonMatcher/Matcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

class Matcher
{
public function match($toMatch, $expectedJson)
public function match($matcher, $matchTo)
{

if (is_array($toMatch)) {
if (-1 === $this->matchArray($toMatch, $expectedJson)) {
if (is_array($matcher)) {
if (-1 === $this->matchArray($matcher, $matchTo)) {
return false;
}
} elseif(is_scalar($toMatch) && strpos($expectedJson, '@') > -1) {
if (-1 === $this->matchType($toMatch, $expectedJson)) {
} elseif(is_scalar($matcher) && strpos($matchTo, '@') > -1) {
if (-1 === $this->matchType($matcher, $matchTo)) {
return false;
}
} elseif (is_scalar($toMatch)) {
if (-1 === $this->matchScalar($toMatch, $expectedJson)) {
} elseif (is_scalar($matcher)) {
if (-1 === $this->matchScalar($matcher, $matchTo)) {
return false;
}
}
Expand Down

0 comments on commit f085f01

Please sign in to comment.