Skip to content

Commit

Permalink
Enhance random functions
Browse files Browse the repository at this point in the history
  • Loading branch information
iranianpep committed Jul 18, 2017
1 parent 5266e68 commit 2c66d11
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/Botonomous/AbstractAccessList.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ public function getSlackUserInfo()
* Get it by user_id. For this users:read and users:read.email are needed.
*/
$userInfo = $this->getApiClient()->userInfo(['user' => $request['user_id']]);

if (empty($userInfo)) {
/*
* Could not find the user in the team
Expand Down
4 changes: 1 addition & 3 deletions src/Botonomous/utility/FileUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public function jsonFileToArray($filePath)
throw new \Exception('File is not a json file');
}

$content = file_get_contents($filePath);

return (new StringUtility())->jsonToArray($content);
return (new StringUtility())->jsonToArray(file_get_contents($filePath));
}
}
1 change: 0 additions & 1 deletion src/Botonomous/utility/StringUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class StringUtility extends AbstractUtility
public function jsonToArray($json)
{
$array = empty($json) ? [] : json_decode($json, true);

if ($array === null || !is_array($array) || json_last_error() !== 0) {
throw new \Exception('Invalid JSON content');
}
Expand Down

0 comments on commit 2c66d11

Please sign in to comment.