@@ -8,37 +8,37 @@ discard block |
||
| 8 | 8 | * @param null|string $msg |
| 9 | 9 | * @return mixed |
| 10 | 10 | */ |
| 11 | - public function invalidArgument($msg=null); |
|
| 11 | + public function invalidArgument($msg = null); |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * @param null|string $msg |
| 15 | 15 | * @return mixed |
| 16 | 16 | */ |
| 17 | - public function badFunctionCall($msg=null); |
|
| 17 | + public function badFunctionCall($msg = null); |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @param null|string $msg |
| 21 | 21 | * @return mixed |
| 22 | 22 | */ |
| 23 | - public function badMethodCall($msg=null); |
|
| 23 | + public function badMethodCall($msg = null); |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @param null|string $msg |
| 27 | 27 | * @return mixed |
| 28 | 28 | */ |
| 29 | - public function domain($msg=null); |
|
| 29 | + public function domain($msg = null); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @param null|string $msg |
| 33 | 33 | * @return mixed |
| 34 | 34 | */ |
| 35 | - public function length($msg=null); |
|
| 35 | + public function length($msg = null); |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @param null|string $msg |
| 39 | 39 | * @return mixed |
| 40 | 40 | */ |
| 41 | - public function logic($msg=null); |
|
| 41 | + public function logic($msg = null); |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * @return mixed |
@@ -49,35 +49,35 @@ discard block |
||
| 49 | 49 | * @param null|string $msg |
| 50 | 50 | * @return mixed |
| 51 | 51 | */ |
| 52 | - public function outOfRange($msg=null); |
|
| 52 | + public function outOfRange($msg = null); |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * @param null|string $msg |
| 56 | 56 | * @return mixed |
| 57 | 57 | */ |
| 58 | - public function overflow($msg=null); |
|
| 58 | + public function overflow($msg = null); |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * @param null|string $msg |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function range($msg=null); |
|
| 64 | + public function range($msg = null); |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @param null|string $msg |
| 68 | 68 | * @return mixed |
| 69 | 69 | */ |
| 70 | - public function runtime($msg=null); |
|
| 70 | + public function runtime($msg = null); |
|
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * @param null|string $msg |
| 74 | 74 | * @return mixed |
| 75 | 75 | */ |
| 76 | - public function underflow($msg=null); |
|
| 76 | + public function underflow($msg = null); |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * @param null|string $msg |
| 80 | 80 | * @return mixed |
| 81 | 81 | */ |
| 82 | - public function unexpectedValue($msg=null); |
|
| 82 | + public function unexpectedValue($msg = null); |
|
| 83 | 83 | } |
| 84 | 84 | \ No newline at end of file |
@@ -14,13 +14,13 @@ discard block |
||
| 14 | 14 | * @param null $name |
| 15 | 15 | * @param array $params |
| 16 | 16 | */ |
| 17 | - public function __construct($app,$name=null,$params=array()) |
|
| 17 | + public function __construct($app, $name = null, $params = array()) |
|
| 18 | 18 | {
|
| 19 | 19 | parent::__construct($app); |
| 20 | 20 | |
| 21 | 21 | // we help the user to pull a special message from |
| 22 | 22 | // the translate section to be specified by the user for the exception. |
| 23 | - $this->exceptionTranslate($name,$params); |
|
| 23 | + $this->exceptionTranslate($name, $params); |
|
| 24 | 24 | |
| 25 | 25 | // for real file path with |
| 26 | 26 | // debug backtrace method are doing follow. |
@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | * @param $name |
| 34 | 34 | * @param array $params |
| 35 | 35 | */ |
| 36 | - private function exceptionTranslate($name,$params=array()) |
|
| 36 | + private function exceptionTranslate($name, $params = array()) |
|
| 37 | 37 | {
|
| 38 | - if($name!==null){
|
|
| 39 | - if(count($params)){
|
|
| 40 | - $this->app->register('exceptionTranslateParams',$name,$params);
|
|
| 38 | + if ($name!==null) {
|
|
| 39 | + if (count($params)) {
|
|
| 40 | + $this->app->register('exceptionTranslateParams', $name, $params);
|
|
| 41 | 41 | } |
| 42 | - $this->app->register('exceptionTranslate',$name);
|
|
| 42 | + $this->app->register('exceptionTranslate', $name);
|
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -50,23 +50,23 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function debugBackTrace() |
| 52 | 52 | {
|
| 53 | - foreach (debug_backtrace() as $key=>$value){
|
|
| 53 | + foreach (debug_backtrace() as $key=>$value) {
|
|
| 54 | 54 | |
| 55 | - if(isset(debug_backtrace()[$key],debug_backtrace()[$key]['file'])) |
|
| 55 | + if (isset(debug_backtrace()[$key], debug_backtrace()[$key]['file'])) |
|
| 56 | 56 | {
|
| 57 | - $this->app->register('exceptionFile',debug_backtrace()[$key]['file']);
|
|
| 58 | - $this->app->register('exceptionLine',debug_backtrace()[$key]['line']);
|
|
| 57 | + $this->app->register('exceptionFile', debug_backtrace()[$key]['file']);
|
|
| 58 | + $this->app->register('exceptionLine', debug_backtrace()[$key]['line']);
|
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | Dependencies::loadBootstrapperNeedsForException(); |
| 62 | 62 | |
| 63 | - if(isset($value['file']) && isset(core()->urlComponent)){
|
|
| 64 | - if(preg_match('@'.core()->urlComponent['project'].'|boot|providers@',$value['file'])){
|
|
| 63 | + if (isset($value['file']) && isset(core()->urlComponent)) {
|
|
| 64 | + if (preg_match('@'.core()->urlComponent['project'].'|boot|providers@', $value['file'])) {
|
|
| 65 | 65 | |
| 66 | 66 | $this->app->terminate('exceptionFile');
|
| 67 | 67 | $this->app->terminate('exceptionLine');
|
| 68 | - $this->app->register('exceptionFile',$value['file']);
|
|
| 69 | - $this->app->register('exceptionLine',$value['line']);
|
|
| 68 | + $this->app->register('exceptionFile', $value['file']);
|
|
| 69 | + $this->app->register('exceptionLine', $value['line']);
|
|
| 70 | 70 | |
| 71 | 71 | break; |
| 72 | 72 | } |
@@ -86,20 +86,20 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | // first, you are looking for an exception |
| 88 | 88 | // in the application directory class. |
| 89 | - if(Utils::isNamespaceExists($nameNamespace)){
|
|
| 89 | + if (Utils::isNamespaceExists($nameNamespace)) {
|
|
| 90 | 90 | $callNamespace = new $nameNamespace; |
| 91 | 91 | } |
| 92 | - else{
|
|
| 92 | + else {
|
|
| 93 | 93 | |
| 94 | 94 | // if you do not have an exception in the application directory, |
| 95 | 95 | // this time we are looking for an exception in the core directory. |
| 96 | 96 | $nameNamespace = __NAMESPACE__.'\\'.$nameException; |
| 97 | - if(Utils::isNamespaceExists($nameNamespace)){
|
|
| 97 | + if (Utils::isNamespaceExists($nameNamespace)) {
|
|
| 98 | 98 | $callNamespace = new $nameNamespace; |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if(isset($callNamespace)){
|
|
| 102 | + if (isset($callNamespace)) {
|
|
| 103 | 103 | |
| 104 | 104 | // we will set the information about the exception trace, |
| 105 | 105 | // and then bind it specifically to the event method. |
@@ -111,11 +111,11 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | // we register the custom exception trace value with the global kernel object. |
| 114 | - $this->app->register('exceptiontrace',$customExceptionTrace);
|
|
| 114 | + $this->app->register('exceptiontrace', $customExceptionTrace);
|
|
| 115 | 115 | |
| 116 | 116 | //If the developer wants to execute an event when calling a special exception, |
| 117 | 117 | //we process the event method. |
| 118 | - if(method_exists($callNamespace,'event')){
|
|
| 118 | + if (method_exists($callNamespace, 'event')) {
|
|
| 119 | 119 | $callNamespace->event($customExceptionTrace); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -88,8 +88,7 @@ |
||
| 88 | 88 | // in the application directory class. |
| 89 | 89 | if(Utils::isNamespaceExists($nameNamespace)){
|
| 90 | 90 | $callNamespace = new $nameNamespace; |
| 91 | - } |
|
| 92 | - else{
|
|
| 91 | + } else{
|
|
| 93 | 92 | |
| 94 | 93 | // if you do not have an exception in the application directory, |
| 95 | 94 | // this time we are looking for an exception in the core directory. |