Skip to content

Commit

Permalink
commit 2.0 to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadamodassir committed Nov 14, 2024
1 parent fa9c5f6 commit 62052b4
Show file tree
Hide file tree
Showing 7 changed files with 322 additions and 178 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"promises",
"php"
],
"homepage": "https://github.com/lazervel",
"autoload": {
"psr-4": {
"Modassir\\Promise\\": "src/"
Expand Down
38 changes: 38 additions & 0 deletions src/ErrorHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types=1);

namespace Modassir\Promise;

\error_reporting(E_ALL);
\ini_set('display_errors', 0);

final class ErrorHandler
{
/**
*
*/
private static function errorHandler() : void
{
//
}

/**
*
*/
private static function shutdown() : void
{
//
}

/**
*
* @return
*/
public static function PHP_ErrorHandlerActivate()
{
\set_error_handler(self::errorHandler(...));
\register_shutdown_function(self::shutdown(...));
}
}
?>
26 changes: 26 additions & 0 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

/**
* The PHP Promise handling PHP promises with additional utilities and features.
* The (promise) Github Repository
* @see https://github.com/lazervel/promise
*
* @author Shahzada Modassir
* @copyright (c) Shahzada Modassir 2024
*
* @license MIT License
* @see https://github.com/lazervel/promise/blob/main/LICENSE
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Modassir\Promise\Exception;

interface ExceptionInterface extends \Throwable
{
//
}
?>
26 changes: 26 additions & 0 deletions src/Exception/UnhandledPromiseRejection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

/**
* The PHP Promise handling PHP promises with additional utilities and features.
* The (promise) Github Repository
* @see https://github.com/lazervel/promise
*
* @author Shahzada Modassir
* @copyright (c) Shahzada Modassir 2024
*
* @license MIT License
* @see https://github.com/lazervel/promise/blob/main/LICENSE
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Modassir\Promise\Exception;

final class UnhandledPromiseRejection extends \Exception implements ExceptionInterface
{
//
}
?>
Loading

0 comments on commit 62052b4

Please sign in to comment.