| @@ -11,9 +11,9 @@ discard block | ||
| 11 | 11 | } | 
| 12 | 12 | |
| 13 | 13 |      static public function singleton() { | 
| 14 | -        if (Registry::exists('APP')) | |
| 15 | -            $app = Registry::get('APP'); | |
| 16 | -        else { | |
| 14 | +        if (Registry::exists('APP')) { | |
| 15 | +                    $app = Registry::get('APP'); | |
| 16 | +        } else { | |
| 17 | 17 | $app = new self; | 
| 18 | 18 |              Registry::set('APP',$app); | 
| 19 | 19 | } | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 |      private function _load($path, $file = null) { | 
| 69 | 69 |          if($file) { | 
| 70 | 70 |              $this->app->config(base_path("{path}/{$file}")); | 
| 71 | -        }else{ | |
| 71 | +        } else{ | |
| 72 | 72 |              foreach(glob(base_path("{$path}/*.ini")) as $file) { | 
| 73 | 73 | $this->app->config($file); | 
| 74 | 74 | } | 
| @@ -93,9 +93,9 @@ discard block | ||
| 93 | 93 | |
| 94 | 94 |          if($type == 'jig'){ | 
| 95 | 95 | $this->db = new DB\Jig($this->app->DB_PATH, DB\Jig::FORMAT_JSON); | 
| 96 | -        }else if($type == 'sql'){ | |
| 96 | +        } else if($type == 'sql'){ | |
| 97 | 97 | $this->db = new DB\SQL($this->app->DB, $this->app->DB_USER, $this->app->DB_PSWD); | 
| 98 | -        }else if($type == 'mongo'){ | |
| 98 | +        } else if($type == 'mongo'){ | |
| 99 | 99 | $this->db = new DB\Mongo($this->app->DB, $this->app->DB_USER); | 
| 100 | 100 | } | 
| 101 | 101 |          $this->app->set('DB', $this->db); | 
| @@ -107,13 +107,13 @@ discard block | ||
| 107 | 107 |          if($type) { | 
| 108 | 108 |              if($this->app->CSRF && ('jig' == $type || 'sql' == $type || 'mongo' == $type)) { | 
| 109 | 109 | $this->configureCSRF($type); | 
| 110 | -            }else if($this->app->CSRF){ | |
| 110 | +            } else if($this->app->CSRF){ | |
| 111 | 111 | $this->session = new Session(null, 'CSRF'); | 
| 112 | -            }else{ | |
| 112 | +            } else{ | |
| 113 | 113 |                  if($type == 'jig' || $type == 'mongo' || $type == 'sql'){ | 
| 114 | 114 |                      $session = str_ireplace('/', '', 'DB\/'.$this->_getDBType($type).'\Session'); | 
| 115 | 115 | $this->session = new $session($this->app->DB); | 
| 116 | -                }else{ | |
| 116 | +                } else{ | |
| 117 | 117 | $this->session = new Session(); | 
| 118 | 118 | } | 
| 119 | 119 | } | 
| @@ -129,7 +129,7 @@ discard block | ||
| 129 | 129 |      private function _getDBType($type) { | 
| 130 | 130 |          if($type == 'jig' || $type == 'mongo'){ | 
| 131 | 131 | return ucfirst($type); | 
| 132 | -        }else if($type == 'sql') { | |
| 132 | +        } else if($type == 'sql') { | |
| 133 | 133 | return strtoupper($type); | 
| 134 | 134 | } | 
| 135 | 135 | } | 
| @@ -144,7 +144,7 @@ discard block | ||
| 144 | 144 |  	public function registerErrorHandler() { | 
| 145 | 145 |  		if($this->app->DEV) { | 
| 146 | 146 | Falsum\Run::handler($this->app->DEBUG != 3); | 
| 147 | -		}else{ | |
| 147 | +		} else{ | |
| 148 | 148 |  			$this->app->set('ONERROR', 'App\Core\Controllers\ErrorController->init'); | 
| 149 | 149 | } | 
| 150 | 150 | } | 
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 |  	if(is_array($template)){ | 
| 23 | 23 | $layout = $template[0]; | 
| 24 | 24 | $view = $template[1]; | 
| 25 | -	}else{ | |
| 25 | +	} else{ | |
| 26 | 26 | $layout = 'layouts/app.htm'; | 
| 27 | 27 | $view = $template; | 
| 28 | 28 | } | 
| @@ -43,11 +43,11 @@ discard block | ||
| 43 | 43 |  				foreach($err as $e) { | 
| 44 | 44 | flash($e, 'danger'); | 
| 45 | 45 | } | 
| 46 | -			}else{ | |
| 46 | +			} else{ | |
| 47 | 47 | flash($err, 'danger'); | 
| 48 | 48 | } | 
| 49 | 49 | } | 
| 50 | -	}else{ | |
| 50 | +	} else{ | |
| 51 | 51 | flash($error, 'danger'); | 
| 52 | 52 | } | 
| 53 | 53 | } | 
| 54 | 54 | \ No newline at end of file |