Skip to content

Commit

Permalink
Added codeStatus method(#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelgalic committed Oct 21, 2024
1 parent fd75527 commit e85a3ce
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/support/enums/http/contracts/firehub.StatusCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,12 @@ public static function fromCode (int $code):self|false;
*/
public function code ():int;

/**
* ### Get status code with status
* @since 1.0.0
*
* @return string Status code with status.
*/
public function codeStatus ():string;

}
13 changes: 13 additions & 0 deletions src/support/enums/http/firehub.StatusCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,17 @@ public function code ():int {

}

/**
* @inheritDoc
*
* @since 1.0.0
*
* @uses \FireHub\Core\Support\Enums\HTTP\StatusCode::code() To get status code.
*/
public function codeStatus ():string {

return $this->code(). ' '.$this->value;

}

}
13 changes: 13 additions & 0 deletions src/support/enums/http/firehub.WebDavStatusCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,17 @@ public function code ():int {

}

/**
* @inheritDoc
*
* @since 1.0.0
*
* @uses \FireHub\Core\Support\Enums\HTTP\StatusCode::code() To get status code.
*/
public function codeStatus ():string {

return $this->code(). ' '.$this->value;

}

}

0 comments on commit e85a3ce

Please sign in to comment.