-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
136 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,15 @@ | |
"name": "riverside/php-orm", | ||
"description": "PHP ORM micro-library and query builder", | ||
"type": "library", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"keywords": ["php", "orm", "pdo", "mysql", "database"], | ||
"homepage": "https://github.com/riverside/php-orm", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Dimitar Ivanov", | ||
"email": "[email protected]", | ||
"homepage": "https://zinoui.com", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/riverside", | ||
"role": "Developer" | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
namespace PhpOrm; | ||
|
||
/** | ||
* Class Base | ||
* | ||
* @package PhpOrm | ||
*/ | ||
class Base | ||
{ | ||
/** | ||
* Throws an exception | ||
* | ||
* @param string $message | ||
* @param int|null $code | ||
* @param \Throwable|null $previous | ||
* @throws Exception | ||
*/ | ||
public function throwException(string $message, int $code=null, \Throwable $previous=null) | ||
{ | ||
throw new Exception($message, $code, $previous); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
namespace PhpOrm; | ||
|
||
/** | ||
* Class Exception | ||
* | ||
* @package PhpOrm | ||
*/ | ||
class Exception extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
namespace PhpOrm\Tests; | ||
|
||
use PhpOrm\Base; | ||
use PhpOrm\Exception; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class BaseTest extends TestCase | ||
{ | ||
public function testException() | ||
{ | ||
$this->expectException(Exception::class); | ||
$base = new Base(); | ||
$base->throwException('Text exception'); | ||
} | ||
} |
Oops, something went wrong.