@@ -5,10 +5,10 @@ |
||
| 5 | 5 | use HnrAzevedo\Datamanager\Datamanager; |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | - * @property string $name |
|
| 9 | - * @property string $email |
|
| 10 | - * @property string $password |
|
| 11 | - */ |
|
| 8 | + * @property string $name |
|
| 9 | + * @property string $email |
|
| 10 | + * @property string $password |
|
| 11 | + */ |
|
| 12 | 12 | class User extends Datamanager{ |
| 13 | 13 | |
| 14 | 14 | public function __construct() |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | if(!Connect::getInstance()->inTransaction()){ |
| 27 | - return Connect::getInstance()->beginTransaction(); |
|
| 27 | + return Connect::getInstance()->beginTransaction(); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | switch ($transaction) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $stmt = Connect::getInstance()->prepare("{$query}"); |
| 41 | 41 | $stmt->execute($data); |
| 42 | 42 | return $stmt->fetchAll(PDO::FETCH_ASSOC); |
| 43 | - }catch(Exception $exception){ |
|
| 43 | + } catch(Exception $exception){ |
|
| 44 | 44 | $this->fail = new DatamanagerException($exception->getMessage(), $exception->getCode(), $exception); |
| 45 | 45 | } |
| 46 | 46 | return []; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $stmt = Connect::getInstance()->prepare("DESCRIBE {$this->table}"); |
| 53 | 53 | $stmt->execute(); |
| 54 | 54 | return $stmt->fetchAll(PDO::FETCH_ASSOC); |
| 55 | - }catch(Exception $exception){ |
|
| 55 | + } catch(Exception $exception){ |
|
| 56 | 56 | $this->fail = new DatamanagerException($exception->getMessage(), $exception->getCode(), $exception); |
| 57 | 57 | return []; |
| 58 | 58 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $this->transaction('commit'); |
| 54 | 54 | |
| 55 | - }catch(DatamanagerException $er){ |
|
| 55 | + } catch(DatamanagerException $er){ |
|
| 56 | 56 | $this->transaction('rollback'); |
| 57 | 57 | throw $er; |
| 58 | 58 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $this->check_fail(); |
| 96 | 96 | |
| 97 | 97 | $this->transaction('commit'); |
| 98 | - }catch(DatamanagerException $er){ |
|
| 98 | + } catch(DatamanagerException $er){ |
|
| 99 | 99 | $this->transaction('rollback'); |
| 100 | 100 | throw $er; |
| 101 | 101 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | ['name','=','Other Name'], |
| 52 | 52 | 'OR' => ['email','LIKE','[email protected]'] |
| 53 | 53 | ])->execute(); |
| 54 | -}catch(DatamanagerException $er){ |
|
| 54 | +} catch(DatamanagerException $er){ |
|
| 55 | 55 | |
| 56 | 56 | //var_dump($er); |
| 57 | 57 | die("Code Error: {$er->getCode()}, Line: {$er->getLine()}, File: {$er->getFile()}, Message: {$er->getMessage()}."); |