Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor conditionals, remove use Kavenegar\Enums\ApiLogs and use Kav… #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Enums/ApiLogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ abstract class ApiLogs extends General {
const Justforfault = "justforfault";
const Enabled = "enabled";
const Disabled = "disabled";
}

?>
}
3 changes: 1 addition & 2 deletions src/Enums/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
abstract class General {
const Enabled = "enabled";
const Disabled = "disabled";
}
?>
}
4 changes: 1 addition & 3 deletions src/Exceptions/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ public function getName()
{
return 'ApiException';
}
}

?>
}
17 changes: 8 additions & 9 deletions src/Exceptions/BaseRuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

namespace Kavenegar\Exceptions;

class BaseRuntimeException extends \RuntimeException
class BaseRuntimeException extends \RuntimeException
{
public function getName()
{
public function getName() {
return 'BaseRuntimeException';
}
public function __construct($message, $code=0) {

public function __construct($message, $code = 0) {
parent::__construct($message, $code);
}
public function errorMessage(){
return "\r\n".$this->getName() . "[{$this->code}] : {$this->message}\r\n";
}
}

?>
public function errorMessage() {
return "\r\n" . $this->getName() . "[{$this->code}] : {$this->message}\r\n";
}
}
4 changes: 1 addition & 3 deletions src/Exceptions/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ public function getName()
{
return 'HttpException';
}
}

?>
}
Loading