Skip to content

Commit

Permalink
Valid argument fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mat-Gr committed Nov 27, 2017
1 parent 88da1b0 commit 77ce659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rossedman/Teamwork/AbstractObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ protected function areArgumentsValid($args, array $accepted)
return;
}

foreach ($args as $arg) {
if (! array_key_exists($arg, $accepted)) {
foreach ($args as $arg => $value) {
if (! in_array($arg, $accepted)) {
throw new \InvalidArgumentException('This call only accepts these arguments: ' . implode(" | ",$accepted));
}
}
Expand Down

0 comments on commit 77ce659

Please sign in to comment.