Skip to content

Commit

Permalink
♻️ errors should be messages like success and info - not title
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Sep 24, 2020
1 parent 560a8da commit 22457b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ public function getMeta()
/**
* add an error to our error stack
*
* @param string $title
* @param string $message
* @param string $detail
* @param integer $status
* @param boolean $source
* @return MetApi
*/
public function addError($title, $detail, $status = 400, $source = false)
public function addError($message, $detail, $status = 400, $source = false)
{
$error = ['status' => $status, 'title' => $title,];
$error = ['status' => $status, 'message' => $message,];

if ($source) {
$error['source'] = $source;
Expand All @@ -219,7 +219,7 @@ public function addError($title, $detail, $status = 400, $source = false)
/**
* Render errors
*
* @param string $key - shortkey or title of error
* @param string $key - shortkey or error message
* @param string|array $replace - shortkey params
* @param integer $status - HTTP status code to pass
* @param bool $source
Expand Down

0 comments on commit 22457b4

Please sign in to comment.