| @@ -19,6 +19,6 @@ | ||
| 19 | 19 | |
| 20 | 20 | public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable ) | 
| 21 | 21 |      { | 
| 22 | - return array(); | |
| 22 | + return array(); | |
| 23 | 23 | } | 
| 24 | 24 | } | 
| @@ -19,6 +19,6 @@ | ||
| 19 | 19 | |
| 20 | 20 | public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable ) | 
| 21 | 21 |      { | 
| 22 | - return array(); | |
| 22 | + return array(); | |
| 23 | 23 | } | 
| 24 | 24 | } | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | '$this->belongsTo(\'%s\', \'%s\', \'%s\', array(\'alias\' => \'%s\'))', | 
| 55 | 55 | $objColumn->getName (), | 
| 56 | 56 | $makerFile->getConfig () | 
| 57 | - ->createClassNamespace ( $constrant ) . Phalcon::SEPARETOR . AbstractMaker::getClassName ( | |
| 57 | + ->createClassNamespace ( $constrant ) . Phalcon::SEPARETOR . AbstractMaker::getClassName ( | |
| 58 | 58 | $constrant->getTable () | 
| 59 | 59 | ), | 
| 60 | 60 | $constrant->getColumn (), | 
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | '$this->hasMany(\'%s\', \'%s\', \'%s\', array(\'alias\' => \'%s\'))', | 
| 87 | 87 | $objColumn->getName (), | 
| 88 | 88 | $makerFile->getConfig () | 
| 89 | - ->createClassNamespace ( $dependence ) | |
| 89 | + ->createClassNamespace ( $dependence ) | |
| 90 | 90 | . Phalcon::SEPARETOR | 
| 91 | 91 | . AbstractMaker::getClassName ( $dependence->getTable () ), | 
| 92 | 92 | $dependence->getColumn (), | 
| @@ -171,7 +171,7 @@ discard block | ||
| 171 | 171 | |
| 172 | 172 | $pdo = $this->getPDO (); | 
| 173 | 173 |          $return1 = $pdo->query ( "SELECT pg_get_serial_sequence('$tableTemp', '$column');" ) | 
| 174 | - ->fetchColumn (); | |
| 174 | + ->fetchColumn (); | |
| 175 | 175 | |
| 176 | 176 |          if ( !is_null ( $return1 ) ) { | 
| 177 | 177 | return $return1; | 
| @@ -247,14 +247,14 @@ discard block | ||
| 247 | 247 | $strSchema = implode ( "', '", $this->schema ); | 
| 248 | 248 | |
| 249 | 249 | $this->totalTables = $this->getPDO () | 
| 250 | - ->query ( | |
| 251 | - "SELECT COUNT(table_name) AS total | |
| 250 | + ->query ( | |
| 251 | + "SELECT COUNT(table_name) AS total | |
| 252 | 252 | FROM information_schema.tables | 
| 253 | 253 | WHERE | 
| 254 | 254 | table_type = 'BASE TABLE' | 
| 255 | 255 | AND table_schema IN ( '" . $strSchema . "' )" | 
| 256 | - ) | |
| 257 | - ->fetchColumn (); | |
| 256 | + ) | |
| 257 | + ->fetchColumn (); | |
| 258 | 258 | } | 
| 259 | 259 | |
| 260 | 260 | return (int) $this->totalTables; | 
| @@ -205,15 +205,15 @@ | ||
| 205 | 205 | public function createDependece ( $constraint_name, $table_name, $column_name, $database, $schema = null ) | 
| 206 | 206 |      { | 
| 207 | 207 | $objConstrantDependence = Constrant::getInstance () | 
| 208 | - ->populate ( | |
| 209 | - array ( | |
| 210 | - 'constrant' => $constraint_name, | |
| 211 | - 'schema' => $schema, | |
| 212 | - 'table' => $table_name, | |
| 213 | - 'column' => $column_name, | |
| 214 | - 'database' => $database | |
| 215 | - ) | |
| 216 | - ); | |
| 208 | + ->populate ( | |
| 209 | + array ( | |
| 210 | + 'constrant' => $constraint_name, | |
| 211 | + 'schema' => $schema, | |
| 212 | + 'table' => $table_name, | |
| 213 | + 'column' => $column_name, | |
| 214 | + 'database' => $database | |
| 215 | + ) | |
| 216 | + ); | |
| 217 | 217 | |
| 218 | 218 | $this->addDependece ( $objConstrantDependence ); | 
| 219 | 219 | |
| @@ -174,10 +174,10 @@ discard block | ||
| 174 | 174 | $sqlTables = !empty($this->tablesName)?"AND table_name IN ( $this->tablesName )":''; | 
| 175 | 175 | |
| 176 | 176 | $this->totalTables = $this->getPDO () | 
| 177 | - ->query ( | |
| 178 | -                                          "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{$this->database}' $sqlTables" | |
| 179 | - ) | |
| 180 | - ->fetchColumn (); | |
| 177 | + ->query ( | |
| 178 | +                                            "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{$this->database}' $sqlTables" | |
| 179 | + ) | |
| 180 | + ->fetchColumn (); | |
| 181 | 181 | } | 
| 182 | 182 | |
| 183 | 183 | return (int) $this->totalTables; | 
| @@ -194,10 +194,10 @@ discard block | ||
| 194 | 194 | public function getSequence ( $table, $column, $schema = 0 ) | 
| 195 | 195 |      { | 
| 196 | 196 | $return = $this->getPDO () | 
| 197 | - ->query ( | |
| 198 | -                           "select * from information_schema.columns where extra like '%auto_increment%' and  TABLE_SCHEMA='{$this->database}' AND TABLE_NAME='{$table}' AND COLUMN_NAME='{$column}';" | |
| 199 | - ) | |
| 200 | - ->fetch ( \PDO::FETCH_ASSOC ); | |
| 197 | + ->query ( | |
| 198 | +                            "select * from information_schema.columns where extra like '%auto_increment%' and  TABLE_SCHEMA='{$this->database}' AND TABLE_NAME='{$table}' AND COLUMN_NAME='{$column}';" | |
| 199 | + ) | |
| 200 | + ->fetch ( \PDO::FETCH_ASSOC ); | |
| 201 | 201 | |
| 202 | 202 |          if ( !$return ) { | 
| 203 | 203 | return; | 
| @@ -192,7 +192,7 @@ discard block | ||
| 192 | 192 | $configIni = isset( $argv[ 'name-ini' ] ) | 
| 193 | 193 | ? $argv[ 'name-ini' ] | 
| 194 | 194 | : $this->_basePath | 
| 195 | - . $this->configIniDefault; | |
| 195 | + . $this->configIniDefault; | |
| 196 | 196 | |
| 197 | 197 | $configTemp = $this->loadIniFile ( realpath ( $configIni ) ); | 
| 198 | 198 | $configCurrent = self::parseConfigEnv ( $configTemp , $argv ); | 
| @@ -206,7 +206,7 @@ discard block | ||
| 206 | 206 |          { | 
| 207 | 207 | $frameworks = implode ( "\n\t" , $this->frameworkList ); | 
| 208 | 208 | throw new \Exception( "list of frameworks: \n\t\033[1;33m" . $frameworks | 
| 209 | - . "\n\033[0m" ); | |
| 209 | + . "\n\033[0m" ); | |
| 210 | 210 | } | 
| 211 | 211 | |
| 212 | 212 | return $argv + array_filter ( $configCurrent ); | 
| @@ -55,7 +55,7 @@ | ||
| 55 | 55 | foreach ( $this->objDbTables as $objDbTable ) | 
| 56 | 56 |          { | 
| 57 | 57 | $this->toArrayFileName[] = AbstractMaker::getClassName ( $objDbTable->getName () ) | 
| 58 | - . '.php'; | |
| 58 | + . '.php'; | |
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | return $this->toArrayFileName; | 
| @@ -400,7 +400,7 @@ | ||
| 400 | 400 | $matches = preg_grep ( '*\.*' , $this->getTablesName () ); | 
| 401 | 401 | if ( count ( $matches ) ) | 
| 402 | 402 |          { | 
| 403 | -           die("\033[0;31mError: Table name must not contain the schema.\033[0m\n"); | |
| 403 | +            die("\033[0;31mError: Table name must not contain the schema.\033[0m\n"); | |
| 404 | 404 | } | 
| 405 | 405 | } | 
| 406 | 406 | |