Skip to content

Commit

Permalink
🎨 restructured app
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jan 26, 2022
1 parent a63e5e8 commit 7b9d975
Show file tree
Hide file tree
Showing 38 changed files with 718 additions and 698 deletions.
30 changes: 19 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
{
"name": "filp/whoops",
"name": "leafs/exception",
"license": "MIT",
"description": "php error handling for cool kids",
"keywords": ["library", "error", "handling", "exception", "whoops", "throwable"],
"homepage": "https://filp.github.io/whoops/",
"description": "Error handler for leaf (fork of whoops)",
"keywords": [
"library",
"error",
"handling",
"exception",
"whoops",
"throwable"
],
"homepage": "https://github.com/leafsphp/exception",
"authors": [
{
"name": "Filipe Dobreira",
"homepage": "https://github.com/filp",
"role": "Developer"
},
{
"name": "Michael Darko",
"email": "[email protected]",
"homepage": "https://mychi.netlify.app",
"role": "Developer"
}
],
"scripts": {
Expand All @@ -29,17 +42,12 @@
},
"autoload": {
"psr-4": {
"Whoops\\": "src/Whoops/"
"Leaf\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Whoops\\": "tests/Whoops/"
}
},
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
"Leaf\\": "tests/Whoops/"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use InvalidArgumentException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use Whoops\Exception\Inspector;
use Whoops\RunInterface;
use Leaf\Exceptions\Inspector;
use Leaf\Exception\RunInterface;

/**
* Abstract implementation of a Handler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use Whoops\Exception\Inspector;
use Whoops\RunInterface;
use Leaf\Exceptions\Inspector;
use Leaf\Exception\RunInterface;

interface HandlerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use Whoops\Exception\Formatter;
use Leaf\Exceptions\Formatter;

/**
* Catches an exception and converts it to a JSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* @author Pierre-Yves Landuré <https://howto.biapy.com/>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Whoops\Exception\Frame;
use Leaf\Exceptions\Frame;

/**
* Handler outputing plaintext error messages. Can be used
Expand Down Expand Up @@ -226,7 +226,7 @@ private function canOutput()

/**
* Get the frame args var_dump.
* @param \Whoops\Exception\Frame $frame [description]
* @param \Leaf\Exceptions\Frame $frame [description]
* @param integer $line [description]
* @return string
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use InvalidArgumentException;
use RuntimeException;
use Symfony\Component\VarDumper\Cloner\AbstractCloner;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use UnexpectedValueException;
use Whoops\Exception\Formatter;
use Whoops\Util\Misc;
use Whoops\Util\TemplateHelper;
use Leaf\Exceptions\Formatter;
use Leaf\Exception\Util\Misc;
use Leaf\Exception\Util\TemplateHelper;

class PrettyPageHandler extends Handler
{
Expand Down Expand Up @@ -300,7 +300,7 @@ public function handle()
/**
* Get the stack trace frames of the exception currently being handled.
*
* @return \Whoops\Exception\FrameCollection
* @return mixed
*/
protected function getExceptionFrames()
{
Expand Down Expand Up @@ -383,7 +383,7 @@ public function addDataTableCallback($label, /* callable */ $callback)
throw new InvalidArgumentException('Expecting callback argument to be callable');
}

$this->extraTables[$label] = function (\Whoops\Exception\Inspector $inspector = null) use ($callback) {
$this->extraTables[$label] = function (\Leaf\Exceptions\Inspector $inspector = null) use ($callback) {
try {
$result = call_user_func($callback, $inspector);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @author Filipe Dobreira <http://github.com/filp>
*/

namespace Whoops\Handler;
namespace Leaf\Exception\Handler;

use SimpleXMLElement;
use Whoops\Exception\Formatter;
use Leaf\Exceptions\Formatter;

/**
* Catches an exception and converts it to an XML
Expand Down
Loading

0 comments on commit 7b9d975

Please sign in to comment.