@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @author Pedro Alarcao <[email protected]> |
| 18 | 18 | */ |
| 19 | - public function __construct () |
|
| 19 | + public function __construct() |
|
| 20 | 20 | { |
| 21 | 21 | } |
| 22 | 22 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * @return string |
| 70 | 70 | */ |
| 71 | - public function getName () |
|
| 71 | + public function getName() |
|
| 72 | 72 | { |
| 73 | 73 | return $this->name; |
| 74 | 74 | } |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | * |
| 79 | 79 | * @param $array |
| 80 | 80 | */ |
| 81 | - public function populate ( $array ) |
|
| 81 | + public function populate($array) |
|
| 82 | 82 | { |
| 83 | - $this->name = $array[ 'name' ]; |
|
| 84 | - $this->type = $array[ 'type' ]; |
|
| 85 | - $this->nullable = $array[ 'nullable' ]; |
|
| 86 | - $this->max_length = $array[ 'max_length' ]; |
|
| 83 | + $this->name = $array['name']; |
|
| 84 | + $this->type = $array['type']; |
|
| 85 | + $this->nullable = $array['nullable']; |
|
| 86 | + $this->max_length = $array['max_length']; |
|
| 87 | 87 | |
| 88 | 88 | return $this; |
| 89 | 89 | } |
@@ -91,31 +91,31 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * @return boolean |
| 93 | 93 | */ |
| 94 | - public function isPrimaryKey () |
|
| 94 | + public function isPrimaryKey() |
|
| 95 | 95 | { |
| 96 | - return ! empty( $this->primarykey ); |
|
| 96 | + return ! empty($this->primarykey); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | 100 | * @return boolean |
| 101 | 101 | */ |
| 102 | - public function isForeingkey () |
|
| 102 | + public function isForeingkey() |
|
| 103 | 103 | { |
| 104 | - return ! empty( $this->refForeingkey ); |
|
| 104 | + return ! empty($this->refForeingkey); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * @return boolean |
| 109 | 109 | */ |
| 110 | - public function hasDependence () |
|
| 110 | + public function hasDependence() |
|
| 111 | 111 | { |
| 112 | - return ! empty( $this->dependences ); |
|
| 112 | + return ! empty($this->dependences); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * @return string |
| 117 | 117 | */ |
| 118 | - public function getType () |
|
| 118 | + public function getType() |
|
| 119 | 119 | { |
| 120 | 120 | return $this->type; |
| 121 | 121 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | /** |
| 124 | 124 | * @return string |
| 125 | 125 | */ |
| 126 | - public function getComment () |
|
| 126 | + public function getComment() |
|
| 127 | 127 | { |
| 128 | 128 | return $this->comment; |
| 129 | 129 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * @param string $comment |
| 133 | 133 | */ |
| 134 | - public function setComment ( $comment ) |
|
| 134 | + public function setComment($comment) |
|
| 135 | 135 | { |
| 136 | 136 | $this->comment = $comment; |
| 137 | 137 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * @param \Classes\Db\Constrant $primarykey |
| 143 | 143 | */ |
| 144 | - public function setPrimaryKey ( Constrant $primarykey ) |
|
| 144 | + public function setPrimaryKey(Constrant $primarykey) |
|
| 145 | 145 | { |
| 146 | 146 | $this->primarykey = $primarykey; |
| 147 | 147 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | /** |
| 152 | 152 | * @param \Classes\Db\Constrant $dependece |
| 153 | 153 | */ |
| 154 | - public function addDependece ( Constrant $dependece ) |
|
| 154 | + public function addDependece(Constrant $dependece) |
|
| 155 | 155 | { |
| 156 | 156 | $this->dependences[] = $dependece; |
| 157 | 157 | |
@@ -165,19 +165,19 @@ discard block |
||
| 165 | 165 | * |
| 166 | 166 | * @return $this |
| 167 | 167 | */ |
| 168 | - public function createDependece ( $constraint_name , $table_name , $column_name , $schema = null ) |
|
| 168 | + public function createDependece($constraint_name, $table_name, $column_name, $schema = null) |
|
| 169 | 169 | { |
| 170 | 170 | $objConstrantDependence = new Constrant(); |
| 171 | - $objConstrantDependence->populate ( |
|
| 172 | - array ( |
|
| 173 | - 'constrant' => $constraint_name , |
|
| 174 | - 'schema' => $schema , |
|
| 175 | - 'table' => $table_name , |
|
| 171 | + $objConstrantDependence->populate( |
|
| 172 | + array( |
|
| 173 | + 'constrant' => $constraint_name, |
|
| 174 | + 'schema' => $schema, |
|
| 175 | + 'table' => $table_name, |
|
| 176 | 176 | 'column' => $column_name |
| 177 | 177 | ) |
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | - $this->addDependece ( $objConstrantDependence ); |
|
| 180 | + $this->addDependece($objConstrantDependence); |
|
| 181 | 181 | |
| 182 | 182 | return $this; |
| 183 | 183 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | /** |
| 186 | 186 | * @param \Classes\Db\Constrant $reference |
| 187 | 187 | */ |
| 188 | - public function addRefFk ( Constrant $reference ) |
|
| 188 | + public function addRefFk(Constrant $reference) |
|
| 189 | 189 | { |
| 190 | 190 | $this->refForeingkey = $reference; |
| 191 | 191 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * |
| 198 | 198 | * @return \Classes\Db\Constrant |
| 199 | 199 | */ |
| 200 | - public function getFks () |
|
| 200 | + public function getFks() |
|
| 201 | 201 | { |
| 202 | 202 | return $this->refForeingkey; |
| 203 | 203 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * |
| 208 | 208 | * @return \Classes\Db\Constrant[] |
| 209 | 209 | */ |
| 210 | - public function getDependences () |
|
| 210 | + public function getDependences() |
|
| 211 | 211 | { |
| 212 | 212 | return $this->dependences; |
| 213 | 213 | } |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | /** |
| 216 | 216 | * @return bool |
| 217 | 217 | */ |
| 218 | - public function hasDependences () |
|
| 218 | + public function hasDependences() |
|
| 219 | 219 | { |
| 220 | - return (bool) count ( $this->dependences ); |
|
| 220 | + return (bool) count($this->dependences); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | /** |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | * |
| 226 | 226 | * @return \Classes\Db\Constrant[] |
| 227 | 227 | */ |
| 228 | - public function getPrimaryKey () |
|
| 228 | + public function getPrimaryKey() |
|
| 229 | 229 | { |
| 230 | 230 | return $this->primarykey; |
| 231 | 231 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | /** |
| 234 | 234 | * |
| 235 | 235 | */ |
| 236 | - public function getMaxLength () |
|
| 236 | + public function getMaxLength() |
|
| 237 | 237 | { |
| 238 | 238 | return $this->max_length; |
| 239 | 239 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | /** |
| 242 | 242 | * @return bool |
| 243 | 243 | */ |
| 244 | - public function hasSequence () |
|
| 244 | + public function hasSequence() |
|
| 245 | 245 | { |
| 246 | 246 | return (bool) $this->sequence; |
| 247 | 247 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | /** |
| 250 | 250 | * @return string |
| 251 | 251 | */ |
| 252 | - public function getSequence () |
|
| 252 | + public function getSequence() |
|
| 253 | 253 | { |
| 254 | 254 | return $this->sequence; |
| 255 | 255 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | /** |
| 258 | 258 | * @param string $sequence |
| 259 | 259 | */ |
| 260 | - public function setSequence ( $sequence ) |
|
| 260 | + public function setSequence($sequence) |
|
| 261 | 261 | { |
| 262 | 262 | $this->sequence = $sequence; |
| 263 | 263 | } |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | /** |
| 266 | 266 | * @return boolean |
| 267 | 267 | */ |
| 268 | - public function isNullable () |
|
| 268 | + public function isNullable() |
|
| 269 | 269 | { |
| 270 | 270 | return $this->nullable; |
| 271 | 271 | } |