GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 953a93...85b2a1 )
by Pedro
05:15 queued 02:31
created
build/Classes/AdapterConfig/None.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     const SEPARETOR = "_";
24 24
 
25
-    protected function init ()
25
+    protected function init()
26 26
     {
27 27
     }
28 28
 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @return array
33 33
      */
34
-    protected function getParams ()
34
+    protected function getParams()
35 35
     {
36 36
 
37 37
     }
38 38
 
39
-    protected function parseFrameworkConfig ()
39
+    protected function parseFrameworkConfig()
40 40
     {
41 41
         // TODO: Implement parseFrameworkConfig() method.
42 42
     }
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @return \Classes\AdapterMakerFile\AbstractAdapter[]
48 48
      */
49
-    public function getMakeFileInstances ()
49
+    public function getMakeFileInstances()
50 50
     {
51
-        return array (
52
-            DbTable::getInstance (),
53
-            Entity::getInstance (),
54
-            Model::getInstance ()
51
+        return array(
52
+            DbTable::getInstance(),
53
+            Entity::getInstance(),
54
+            Model::getInstance()
55 55
         );
56 56
     }
57 57
 
Please login to merge, or discard this patch.
build/Classes/AdapterMakerFile/Phalcon/Model.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
     /**
13 13
      * @var void
14 14
      */
15
-    protected $fileTpl       = "model.php";
15
+    protected $fileTpl = "model.php";
16 16
 
17
-    public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable )
17
+    public function parseRelation(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable)
18 18
     {
19 19
        return array();
20 20
     }
Please login to merge, or discard this patch.
build/Classes/Db/Constrant.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@
 block discarded – undo
70 70
         return $this;
71 71
     }
72 72
 
73
+    /**
74
+     * @return string
75
+     */
73 76
     public function getDatabase (){
74 77
         return $this->database;
75 78
     }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @author Pedro Alarcao <[email protected]>
23 23
      */
24
-    final private function __construct ()
24
+    final private function __construct()
25 25
     {
26 26
     }
27 27
 
28
-    public static function getInstance ()
28
+    public static function getInstance()
29 29
     {
30 30
         return new self();
31 31
     }
@@ -55,34 +55,34 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return Constrant
57 57
      */
58
-    public function populate ( $array )
58
+    public function populate($array)
59 59
     {
60
-        if ( isset( $array[ 'schema' ] ) )
60
+        if (isset($array['schema']))
61 61
         {
62
-            $this->schema = $array[ 'schema' ];
62
+            $this->schema = $array['schema'];
63 63
         }
64 64
 
65
-        $this->database = $array[ 'database' ];
66
-        $this->constrant = $array[ 'constrant' ];
67
-        $this->table = $array[ 'table' ];
68
-        $this->column = $array[ 'column' ];
65
+        $this->database = $array['database'];
66
+        $this->constrant = $array['constrant'];
67
+        $this->table = $array['table'];
68
+        $this->column = $array['column'];
69 69
 
70 70
         return $this;
71 71
     }
72 72
 
73
-    public function getDatabase (){
73
+    public function getDatabase() {
74 74
         return $this->database;
75 75
     }
76 76
 
77 77
     /**
78 78
      * @return string
79 79
      */
80
-    public function getNameConstrant ()
80
+    public function getNameConstrant()
81 81
     {
82 82
         return $this->constrant;
83 83
     }
84 84
 
85
-    public function hasSchema ()
85
+    public function hasSchema()
86 86
     {
87 87
         return (bool) $this->schema;
88 88
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * @return string
92 92
      */
93
-    public function getSchema ()
93
+    public function getSchema()
94 94
     {
95 95
         return $this->schema;
96 96
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * @return string
100 100
      */
101
-    public function getTable ()
101
+    public function getTable()
102 102
     {
103 103
         return $this->table;
104 104
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     /**
107 107
      * @return string
108 108
      */
109
-    public function getColumn ()
109
+    public function getColumn()
110 110
     {
111 111
         return $this->column;
112 112
     }
Please login to merge, or discard this patch.
build/Classes/templates/zf1/entity.php 2 patches
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,9 +140,12 @@  discard block
 block discarded – undo
140 140
     * Stored in ISO 8601 format.
141 141
     *
142 142
     * @param string|Zend_Date $<?=$column->getName() . "\n"?>
143
-<?php else: ?>
143
+<?php else {
144
+    : ?>
144 145
     * @param <?=$column->getType()?> $<?=$column->getName() . "\n"?>
145
-<?php endif; ?>
146
+<?php endif;
147
+}
148
+?>
146 149
     * @return <?=$className . "\n"?>
147 150
     */
148 151
     public function set<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>($<?=$column->getName()?>)
@@ -189,9 +192,12 @@  discard block
 block discarded – undo
189 192
 <?php if ($column->getType()=='date'): ?>
190 193
     * @param boolean $returnZendDate
191 194
     * @return Zend_Date|null|string Zend_Date representation of this datetime if enabled, or ISO 8601 string if not
192
-<?php else: ?>
195
+<?php else {
196
+    : ?>
193 197
     * @return <?=$column->getType() . "\n"?>
194
-<?php endif; ?>
198
+<?php endif;
199
+}
200
+?>
195 201
     */
196 202
     public function get<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>(<?php if ($column->getType()=='date'): ?>$returnZendDate = false <?php endif;?>)
197 203
     {
Please login to merge, or discard this patch.
Spacing   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?= "<?php\n" ?>
2
-<?php $classNameModel = $objTables->getNamespace () . '_' . \Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () ) ?>
3
-<?php $className = $objTables->getNamespace () . '_Entity_' . \Classes\Maker\AbstractMaker::getClassName (
4
-        $objTables->getName ()
2
+<?php $classNameModel = $objTables->getNamespace() . '_' . \Classes\Maker\AbstractMaker::getClassName($objTables->getName()) ?>
3
+<?php $className = $objTables->getNamespace() . '_Entity_' . \Classes\Maker\AbstractMaker::getClassName(
4
+        $objTables->getName()
5 5
     ) ?>
6 6
 
7 7
 /**
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  *
10 10
  * <?= $this->config->last_modify . "\n" ?>
11 11
  *
12
- * @package <?= $objTables->getNamespace () . "\n" ?>
12
+ * @package <?= $objTables->getNamespace() . "\n" ?>
13 13
  * @subpackage Entity
14 14
  *
15 15
  * @author    <?= $this->config->author . "\n" ?>
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
  */
26 26
 
27 27
 abstract class <?= $className ?> extends <?= $this->config->namespace ? $this->config->namespace
28
-                                                                        . "_" : "" ?>Model_<?= $objMakeFile->getParentClass (
28
+                                                                        . "_" : "" ?>Model_<?= $objMakeFile->getParentClass(
29 29
 ) . "\n" ?>
30 30
 {
31 31
 
32
-<?php foreach ( $objTables->getColumns () as $column ): ?>
32
+<?php foreach ($objTables->getColumns() as $column): ?>
33 33
     /**
34
-     * Database constraint in the column <?= $column->getName () . "\n" ?>
34
+     * Database constraint in the column <?= $column->getName() . "\n" ?>
35 35
      *
36 36
      */
37
-    const <?= strtoupper ( $column->getName () ) ?> = '<?= $objTables->getName () ?>.<?= $column->getName () ?>';
37
+    const <?= strtoupper($column->getName()) ?> = '<?= $objTables->getName() ?>.<?= $column->getName() ?>';
38 38
 <?php endforeach; ?>
39 39
 
40 40
     /**
@@ -43,17 +43,17 @@  discard block
 block discarded – undo
43 43
      * @var string
44 44
      * @access protected
45 45
      */
46
-    protected $_tableClass = '<?= $objTables->getNamespace () ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName (
47
-    $objTables->getName ()
46
+    protected $_tableClass = '<?= $objTables->getNamespace() ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName(
47
+    $objTables->getName()
48 48
 ) ?>';
49 49
 
50 50
     /**
51 51
      * @see <?= $this->config->namespace ?>Model_EntityAbstract::$_columnsList
52 52
      */
53 53
     protected $_columnsList = array(
54
-<?php foreach ( $objTables->getColumns () as $column ): ?>
55
-        self::<?= strtoupper ( $column->getName () ) ?> => '<?= strtolower (
56
-            \Classes\Maker\AbstractMaker::getClassName ( $column->getName () )
54
+<?php foreach ($objTables->getColumns() as $column): ?>
55
+        self::<?= strtoupper($column->getName()) ?> => '<?= strtolower(
56
+            \Classes\Maker\AbstractMaker::getClassName($column->getName())
57 57
     ) ?>',
58 58
 <?php endforeach; ?>
59 59
     );
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
      * @see <?= $this->config->namespace ?>Model_EntityAbstract::$_filters
63 63
      */
64 64
     protected $_filters = array(
65
-<?php foreach ( $objTables->getColumns () as $column ): ?>
65
+<?php foreach ($objTables->getColumns() as $column): ?>
66 66
 <?php
67 67
     $filters = null;
68
-    switch ( strtolower ( $column->getType () ) ) {
68
+    switch (strtolower($column->getType())) {
69 69
         case 'string':
70 70
             $filters = 'StripTags", "StringTrim';
71 71
             break;
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
         case 'boolean':
78 78
             break;
79 79
         default:
80
-            $filters = ucfirst ( $column->getType () );
80
+            $filters = ucfirst($column->getType());
81 81
             break;
82 82
     }
83 83
     ?>
84
-    '<?= $column->getName () ?>' => array (
85
-            <?= ( !empty( $filters ) ) ? "\"{$filters}\"\n" : null; ?>
84
+    '<?= $column->getName() ?>' => array (
85
+            <?= ( ! empty($filters)) ? "\"{$filters}\"\n" : null; ?>
86 86
         ),
87 87
 <?php endforeach; ?>
88 88
     );
@@ -91,34 +91,34 @@  discard block
 block discarded – undo
91 91
      * @see <?= $this->config->namespace ?>Model_EntityAbstract::$_validators
92 92
      */
93 93
     protected $_validators= array(
94
-<?php foreach ( $objTables->getColumns () as $column ): ?>
94
+<?php foreach ($objTables->getColumns() as $column): ?>
95 95
 <?php
96
-    $validators = array ();
96
+    $validators = array();
97 97
 
98
-    $validators[] = $column->isNullable () ? "'allowEmpty' => true" : "'NotEmpty'";
98
+    $validators[] = $column->isNullable() ? "'allowEmpty' => true" : "'NotEmpty'";
99 99
 
100
-    switch ( strtolower ( $column->getType () ) ) {
100
+    switch (strtolower($column->getType())) {
101 101
         case 'string':
102
-            if ( $column->getMaxLength () ) {
103
-                $validators[] = "array( 'StringLength', array( 'max' => " . $column->getMaxLength () . " ) )";
102
+            if ($column->getMaxLength()) {
103
+                $validators[] = "array( 'StringLength', array( 'max' => " . $column->getMaxLength() . " ) )";
104 104
             }
105 105
 
106 106
             break;
107 107
         case 'boolean':
108 108
             break;
109 109
         default:
110
-            $name         = ucfirst ( $column->getType () );
110
+            $name         = ucfirst($column->getType());
111 111
             $validators[] = "'$name'";
112 112
             break;
113 113
     }
114
-$validators = implode ( ", ", $validators ) ?>
115
-    '<?= $column->getName () ?>' => array (
116
-            <?= ( !empty( $validators ) ) ? "{$validators}\n" : null ?>
114
+$validators = implode(", ", $validators) ?>
115
+    '<?= $column->getName() ?>' => array (
116
+            <?= ( ! empty($validators)) ? "{$validators}\n" : null ?>
117 117
         ),
118 118
 <?php endforeach; ?>
119 119
     );
120 120
 
121
-<?php if ( $objTables->hasPrimaryKey () ): ?>
121
+<?php if ($objTables->hasPrimaryKey()): ?>
122 122
     /**
123 123
     * Nome da Primary Key
124 124
     *
@@ -126,39 +126,39 @@  discard block
 block discarded – undo
126 126
     * @access protected
127 127
     */
128 128
    protected $_primary = array(
129
-<?php foreach ( $objTables->getPrimarykeys () as $pks ) : ?>
130
-        '<?= $pks->getName () ?>',
129
+<?php foreach ($objTables->getPrimarykeys() as $pks) : ?>
130
+        '<?= $pks->getName() ?>',
131 131
 <?php endforeach ?>
132 132
     );
133 133
 <?php endif ?>
134 134
 
135
-<?php foreach ( $parents as $parent ): ?>
135
+<?php foreach ($parents as $parent): ?>
136 136
     /**
137
-     * Parent relation <?= \Classes\Maker\AbstractMaker::getClassName ( $parent[ 'table' ] ) . "\n" ?>
137
+     * Parent relation <?= \Classes\Maker\AbstractMaker::getClassName($parent['table']) . "\n" ?>
138 138
      *
139
-     * - CONSTRAINT in DB <?= $parent[ 'name' ] . "\n" ?>
139
+     * - CONSTRAINT in DB <?= $parent['name'] . "\n" ?>
140 140
      *
141
-     * @var <?= $parent[ 'variable' ] . "\n" ?>
141
+     * @var <?= $parent['variable'] . "\n" ?>
142 142
      */
143
-    protected $_parent_<?= $parent[ 'variable' ] ?>;
143
+    protected $_parent_<?= $parent['variable'] ?>;
144 144
 
145 145
 <?php endforeach; ?>
146
-<?php foreach ( $depends as $depend ): ?>
146
+<?php foreach ($depends as $depend): ?>
147 147
     /**
148
-     * Depends relation <?= \Classes\Maker\AbstractMaker::getClassName ( $depend[ 'table' ] ) . "\n" ?>
148
+     * Depends relation <?= \Classes\Maker\AbstractMaker::getClassName($depend['table']) . "\n" ?>
149 149
      *
150
-     * - CONSTRAINT in DB <?= $depend[ 'name' ] . "\n" ?>
150
+     * - CONSTRAINT in DB <?= $depend['name'] . "\n" ?>
151 151
      *
152
-     * @var <?= $depend[ 'variable' ] . "\n" ?>
152
+     * @var <?= $depend['variable'] . "\n" ?>
153 153
      */
154
-    protected $_depend_<?= $depend[ 'variable' ] ?>;
154
+    protected $_depend_<?= $depend['variable'] ?>;
155 155
 
156 156
 <?php endforeach; ?>
157 157
 
158 158
     /**
159 159
      * @param int $primarykey
160 160
      *
161
-     * @return <?=$classNameModel."\n"?>
161
+     * @return <?=$classNameModel . "\n"?>
162 162
      */
163 163
     public function find ( $primarykey )
164 164
     {
@@ -176,53 +176,53 @@  discard block
 block discarded – undo
176 176
        return <?=$classNameModel?>::retrieveAll ( $where , $order , $count , $offset );
177 177
     }
178 178
 
179
-<?php foreach ( $objTables->getColumns () as $column ): ?>
179
+<?php foreach ($objTables->getColumns() as $column): ?>
180 180
     /**
181 181
      *
182
-     * Sets column <?= $column->getName () . "\n" ?>
182
+     * Sets column <?= $column->getName() . "\n" ?>
183 183
      *
184
-<?php if ( $column->equalType ( 'date' ) ): ?>
184
+<?php if ($column->equalType('date')): ?>
185 185
      * Stored in ISO 8601 format.
186 186
      *
187
-     * @param string|Zend_Date $<?= $column->getName () . "\n" ?>
187
+     * @param string|Zend_Date $<?= $column->getName() . "\n" ?>
188 188
 <?php else: ?>
189
-     * @param <?= $column->getType () ?> $<?= $column->getName () . "\n" ?>
189
+     * @param <?= $column->getType() ?> $<?= $column->getName() . "\n" ?>
190 190
 <?php endif; ?>
191 191
      * @return <?= $className . "\n" ?>
192 192
      */
193
-    public function set<?= \Classes\Maker\AbstractMaker::getClassName ( $column->getName () ) ?>($<?= $column->getName (
193
+    public function set<?= \Classes\Maker\AbstractMaker::getClassName($column->getName()) ?>($<?= $column->getName(
194 194
     ) ?>)
195 195
     {
196
-<?php switch ( strtolower( $column->getType () ) ):
196
+<?php switch (strtolower($column->getType())):
197 197
         case 'date': ?>
198
-            if (! empty($<?= $column->getName () ?>))
198
+            if (! empty($<?= $column->getName() ?>))
199 199
             {
200
-                if (! $<?= $column->getName () ?> instanceof Zend_Date)
200
+                if (! $<?= $column->getName() ?> instanceof Zend_Date)
201 201
                 {
202
-                    $<?= $column->getName () ?> = new Zend_Date($<?= $column->getName () ?>);
202
+                    $<?= $column->getName() ?> = new Zend_Date($<?= $column->getName() ?>);
203 203
                 }
204 204
 
205
-                $this-><?= $column->getName () ?> = $<?= $column->getName () ?>->toString(Zend_Date::ISO_8601);
205
+                $this-><?= $column->getName() ?> = $<?= $column->getName() ?>->toString(Zend_Date::ISO_8601);
206 206
             }
207 207
 
208 208
 <?php break;
209 209
         default: ?>
210
-<?php if(!$column->isNullable () && strtolower( $column->getType () ) != 'boolean'):?>
211
-            $<?= $column->getName () ?> = (<?= ucfirst ( $column->getType () ) ?>) $<?= $column->getName () ?> ;
210
+<?php if ( ! $column->isNullable() && strtolower($column->getType()) != 'boolean'):?>
211
+            $<?= $column->getName() ?> = (<?= ucfirst($column->getType()) ?>) $<?= $column->getName() ?> ;
212 212
 <?php endif ?>
213
-            $input = new Zend_Filter_Input($this->_filters, $this->_validators, array('<?= $column->getName (
214
-            ) ?>'=>$<?= $column->getName () ?> ));
213
+            $input = new Zend_Filter_Input($this->_filters, $this->_validators, array('<?= $column->getName(
214
+            ) ?>'=>$<?= $column->getName() ?> ));
215 215
 
216
-            if(!$input->isValid ('<?= $column->getName () ?>'))
216
+            if(!$input->isValid ('<?= $column->getName() ?>'))
217 217
             {
218 218
                 $errors =  $input->getMessages ();
219
-                foreach ( $errors['<?= $column->getName () ?>'] as $key => $value )
219
+                foreach ( $errors['<?= $column->getName() ?>'] as $key => $value )
220 220
                 {
221 221
                     throw new Exception ( $value );
222 222
                 }
223 223
             }
224 224
 
225
-            $this-><?= $column->getName () ?>  = $<?= $column->getName () ?> ;
225
+            $this-><?= $column->getName() ?>  = $<?= $column->getName() ?> ;
226 226
 
227 227
 <?php break ?>
228 228
 <?php endswitch ?>
@@ -230,71 +230,71 @@  discard block
 block discarded – undo
230 230
     }
231 231
 
232 232
     /**
233
-     * Gets column <?= $column->getName () . "\n" ?>
233
+     * Gets column <?= $column->getName() . "\n" ?>
234 234
      *
235
-<?php if ( $column->equalType ( 'date' ) ): ?>
235
+<?php if ($column->equalType('date')): ?>
236 236
      * @param boolean $returnZendDate
237 237
      * @return Zend_Date|null|string Zend_Date representation of this datetime if enabled, or ISO 8601 string if not
238 238
 <?php else: ?>
239
-     * @return <?= $column->getType () . "\n" ?>
239
+     * @return <?= $column->getType() . "\n" ?>
240 240
 <?php endif; ?>
241 241
      */
242
-    public function get<?= \Classes\Maker\AbstractMaker::getClassName (
243
-        $column->getName ()
244
-    ) ?>(<?php if ( $column->equalType ( 'date' ) ): ?>$returnZendDate = false <?php endif; ?>)
242
+    public function get<?= \Classes\Maker\AbstractMaker::getClassName(
243
+        $column->getName()
244
+    ) ?>(<?php if ($column->equalType('date')): ?>$returnZendDate = false <?php endif; ?>)
245 245
     {
246
-<?php if ( $column->equalType ( 'date' ) ): ?>
246
+<?php if ($column->equalType('date')): ?>
247 247
         if ($returnZendDate)
248 248
         {
249
-            if ($this->_data['<?= $column->getName () ?>'] === null)
249
+            if ($this->_data['<?= $column->getName() ?>'] === null)
250 250
             {
251 251
                 return null;
252 252
             }
253 253
 
254
-            return new Zend_Date($this-><?= $column->getName () ?>, Zend_Date::ISO_8601);
254
+            return new Zend_Date($this-><?= $column->getName() ?>, Zend_Date::ISO_8601);
255 255
         }
256 256
 <?php endif; ?>
257
-        return $this-><?= $column->getName () ?>;
257
+        return $this-><?= $column->getName() ?>;
258 258
     }
259 259
 
260 260
 <?php endforeach; ?>
261
-<?php foreach ( $parents as $parent ): ?>
261
+<?php foreach ($parents as $parent): ?>
262 262
     /**
263
-     * Gets parent <?= $parent[ 'table' ] . "\n" ?>
263
+     * Gets parent <?= $parent['table'] . "\n" ?>
264 264
      *
265
-     * @return <?= $parent[ 'class' ] . "\n" ?>
265
+     * @return <?= $parent['class'] . "\n" ?>
266 266
      */
267
-    public function get<?= $parent[ 'function' ] ?>()
267
+    public function get<?= $parent['function'] ?>()
268 268
     {
269
-        if ($this->_parent_<?= $parent[ 'variable' ] ?> === null)
269
+        if ($this->_parent_<?= $parent['variable'] ?> === null)
270 270
         {
271
-            $this->_parent_<?= $parent[ 'variable' ] ?> = $this->findParentRow('<?= $objTables->getNamespace (
272
-    ) ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName (
273
-        $parent[ 'table' ]
274
-    ) ?>', '<?= \Classes\Maker\AbstractMaker::getClassName ( $parent[ 'variable' ] ) ?>');
271
+            $this->_parent_<?= $parent['variable'] ?> = $this->findParentRow('<?= $objTables->getNamespace(
272
+    ) ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName(
273
+        $parent['table']
274
+    ) ?>', '<?= \Classes\Maker\AbstractMaker::getClassName($parent['variable']) ?>');
275 275
         }
276 276
 
277
-        return $this->_parent_<?= $parent[ 'variable' ] ?>;
277
+        return $this->_parent_<?= $parent['variable'] ?>;
278 278
     }
279 279
 
280 280
 <?php endforeach; ?>
281 281
 
282 282
 
283
-<?php foreach ( $depends as $depend ): ?>
283
+<?php foreach ($depends as $depend): ?>
284 284
     /**
285
-     * Gets dependent <?= $depend[ 'table' ] . "\n" ?>
285
+     * Gets dependent <?= $depend['table'] . "\n" ?>
286 286
      *
287
-     * @return <?= $depend[ 'class' ] . "\n" ?>
287
+     * @return <?= $depend['class'] . "\n" ?>
288 288
      */
289
-    public function get<?= $depend[ 'function' ] ?>()
289
+    public function get<?= $depend['function'] ?>()
290 290
     {
291
-        if ($this->_depend_<?= $depend[ 'variable' ] ?> === null)
291
+        if ($this->_depend_<?= $depend['variable'] ?> === null)
292 292
         {
293
-            $this->_depend_<?= $depend[ 'variable' ] ?> = $this->findDependentRowset('<?= $objTables->getNamespace (
294
-    ) ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName ( $depend[ 'table' ] ) ?>');
293
+            $this->_depend_<?= $depend['variable'] ?> = $this->findDependentRowset('<?= $objTables->getNamespace(
294
+    ) ?>_DbTable_<?= \Classes\Maker\AbstractMaker::getClassName($depend['table']) ?>');
295 295
         }
296 296
 
297
-        return $this->_depend_<?= $depend[ 'variable' ] ?>;
297
+        return $this->_depend_<?= $depend['variable'] ?>;
298 298
     }
299 299
 
300 300
 <?php endforeach; ?>
Please login to merge, or discard this patch.
build/Classes/AdapterConfig/AbstractAdapter.php 3 patches
Doc Comments   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     /**
137 137
      * @param \Classes\Db\DbTable|\Classes\Db\Constrant $table
138 138
      *
139
-     * @return mixed
139
+     * @return string
140 140
      */
141 141
 
142 142
     public function createClassNamespace ( $table )
@@ -225,6 +225,9 @@  discard block
 block discarded – undo
225 225
         return true;
226 226
     }
227 227
 
228
+    /**
229
+     * @return string
230
+     */
228 231
     protected function getFrameworkIni ()
229 232
     {
230 233
         return $this->framworkFiles[ 'ini' ];
@@ -332,7 +335,6 @@  discard block
 block discarded – undo
332 335
     }
333 336
 
334 337
     /**
335
-     * @param string $schema
336 338
      *
337 339
      * @return string
338 340
      */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -16,87 +16,87 @@  discard block
 block discarded – undo
16 16
 abstract class AbstractAdapter
17 17
 {
18 18
 
19
-    protected $arrConfig = array (
19
+    protected $arrConfig = array(
20 20
         ############################# DATABASE
21 21
         //Driver do banco de dados
22
-        'driver'          => null ,
22
+        'driver'          => null,
23 23
         //Nome do banco de dados
24
-        'database'        => null ,
24
+        'database'        => null,
25 25
         //Host do banco
26
-        'host'            => 'localhost' ,
26
+        'host'            => 'localhost',
27 27
         //Port do banco
28
-        'port'            => '' ,
28
+        'port'            => '',
29 29
         //usuario do banco
30
-        'username'        => null ,
30
+        'username'        => null,
31 31
         //senha do banco
32
-        'password'        => null ,
32
+        'password'        => null,
33 33
         // lista de schemas do banco de dados
34
-        'schema'          => array () ,
35
-        'version'         => '' ,
36
-        'socket'          => null ,
34
+        'schema'          => array(),
35
+        'version'         => '',
36
+        'socket'          => null,
37 37
 
38 38
         ########################### DOCS
39 39
         // autor que gerou o script
40
-        'author'          => "Pedro" ,
41
-        'license'         => "New BSD License" ,
42
-        'copyright'       => "ORM Generator - Pedro151" ,
43
-        'link'            => 'https://github.com/pedro151/orm-generator' ,
44
-        'version'         => '' ,
40
+        'author'          => "Pedro",
41
+        'license'         => "New BSD License",
42
+        'copyright'       => "ORM Generator - Pedro151",
43
+        'link'            => 'https://github.com/pedro151/orm-generator',
44
+        'version'         => '',
45 45
         // data que foi gerado o script
46
-        'last_modify'     => null ,
46
+        'last_modify'     => null,
47 47
 
48 48
         ########################## Ambiente/Arquivos
49 49
 
50 50
         // Nome do framework para o adapter
51
-        'framework'       => null ,
51
+        'framework'       => null,
52 52
         // namespace das classes
53
-        'namespace'       => "" ,
53
+        'namespace'       => "",
54 54
         // caminho onde os arquivos devem ser criados
55
-        'path'            => 'models' ,
55
+        'path'            => 'models',
56 56
         // flag para gerar pasta com o nome do driver do banco de dados
57
-        'folder-database' => 0 ,
57
+        'folder-database' => 0,
58 58
         // string com o nome da pastar personalizada
59
-        'folder-name'     => '' ,
59
+        'folder-name'     => '',
60 60
 
61 61
         'clean-trash'     => false,
62 62
 
63 63
         ############################## Comandos adicionais
64 64
         //flag para mostrar o status da execução ao termino do processo
65
-        'status'          => false ,
65
+        'status'          => false,
66 66
         // flags para criar todas as tabelas ou nao
67
-        'tables'          => array () ,
67
+        'tables'          => array(),
68 68
         //Lista de tabelas a serem ignoradas
69
-        'ignoreTable'     => array () ,
69
+        'ignoreTable'     => array(),
70 70
     );
71 71
 
72 72
     /**
73 73
      * @var string[] um array com todos os campos obrigatorios
74 74
      */
75
-    protected $attRequered = array (
76
-        'driver'   => true ,
77
-        'database' => true ,
78
-        'host'     => true ,
79
-        'username' => true ,
75
+    protected $attRequered = array(
76
+        'driver'   => true,
77
+        'database' => true,
78
+        'host'     => true,
79
+        'username' => true,
80 80
         'path'     => true
81 81
     );
82 82
 
83
-    protected $arrFunc = array ();
83
+    protected $arrFunc = array();
84 84
 
85
-    private $framworkFiles = array ();
85
+    private $framworkFiles = array();
86 86
 
87
-    public $reservedWord = array ();
87
+    public $reservedWord = array();
88 88
 
89
-    private static $dataTypesDefault = array (
90
-        'int'      => 'int' ,
91
-        'float'    => 'float' ,
92
-        'string'   => 'string' ,
93
-        'text'     => 'string' ,
94
-        'date'     => 'date' ,
95
-        'datetime' => 'date' ,
89
+    private static $dataTypesDefault = array(
90
+        'int'      => 'int',
91
+        'float'    => 'float',
92
+        'string'   => 'string',
93
+        'text'     => 'string',
94
+        'date'     => 'date',
95
+        'datetime' => 'date',
96 96
         'boolean'  => 'boolean'
97 97
     );
98 98
 
99
-    protected $dataTypes = array ();
99
+    protected $dataTypes = array();
100 100
 
101 101
     const SEPARETOR = "";
102 102
 
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @return bool
107 107
      */
108
-    protected function checkConfig ()
108
+    protected function checkConfig()
109 109
     {
110
-        if ( array_diff_key ( $this->attRequered , array_filter ( $this->arrConfig ) ) )
110
+        if (array_diff_key($this->attRequered, array_filter($this->arrConfig)))
111 111
         {
112 112
             return false;
113 113
         }
@@ -120,33 +120,33 @@  discard block
 block discarded – undo
120 120
      *
121 121
      * @return array
122 122
      */
123
-    abstract protected function getParams ();
123
+    abstract protected function getParams();
124 124
 
125 125
     /**
126 126
      * Popula as config do generater com as configuraçoes do framework
127 127
      *
128 128
      * @return mixed
129 129
      */
130
-    abstract protected function parseFrameworkConfig ();
130
+    abstract protected function parseFrameworkConfig();
131 131
 
132 132
     /**
133 133
      * Cria Instancias dos arquivos que devem ser gerados
134 134
      *
135 135
      * @return \Classes\AdapterMakerFile\AbstractAdapter[]
136 136
      */
137
-    abstract public function getMakeFileInstances ();
137
+    abstract public function getMakeFileInstances();
138 138
 
139
-    abstract protected function init ();
139
+    abstract protected function init();
140 140
 
141 141
     /**
142 142
      * retorna a base do Namespace
143 143
      *
144 144
      * @return array
145 145
      */
146
-    protected function getBaseNamespace ()
146
+    protected function getBaseNamespace()
147 147
     {
148
-        return array (
149
-            $this->arrConfig[ 'namespace' ] ,
148
+        return array(
149
+            $this->arrConfig['namespace'],
150 150
             'Model'
151 151
         );
152 152
     }
@@ -157,54 +157,54 @@  discard block
 block discarded – undo
157 157
      * @return mixed
158 158
      */
159 159
 
160
-    public function createClassNamespace ( $table )
160
+    public function createClassNamespace($table)
161 161
     {
162
-        $arrNames = $this->getBaseNamespace ();
162
+        $arrNames = $this->getBaseNamespace();
163 163
 
164
-        if ( isset( $this->arrConfig[ 'folder-database' ] )
165
-             && $this->arrConfig[ 'folder-database' ]
164
+        if (isset($this->arrConfig['folder-database'])
165
+             && $this->arrConfig['folder-database']
166 166
         )
167 167
         {
168
-            $arrNames[] = AbstractMaker::getClassName ( $this->arrConfig[ 'driver' ] );
168
+            $arrNames[] = AbstractMaker::getClassName($this->arrConfig['driver']);
169 169
         }
170 170
 
171
-        if ( isset( $this->arrConfig[ 'folder-name' ] )
172
-             && $this->arrConfig[ 'folder-name' ]
171
+        if (isset($this->arrConfig['folder-name'])
172
+             && $this->arrConfig['folder-name']
173 173
         )
174 174
         {
175
-            $arrNames[] = AbstractMaker::getClassName ( $this->arrConfig[ 'folder-name' ] );
175
+            $arrNames[] = AbstractMaker::getClassName($this->arrConfig['folder-name']);
176 176
         }
177 177
 
178
-        if ( $table->hasSchema () )
178
+        if ($table->hasSchema())
179 179
         {
180
-            $arrNames[] = $this->replaceReservedWord ( AbstractMaker::getClassName ( $table->getSchema () ) );
180
+            $arrNames[] = $this->replaceReservedWord(AbstractMaker::getClassName($table->getSchema()));
181 181
         } else
182 182
         {
183
-            $arrNames[] = $this->replaceReservedWord ( AbstractMaker::getClassName ( $table->getDatabase () ) );
183
+            $arrNames[] = $this->replaceReservedWord(AbstractMaker::getClassName($table->getDatabase()));
184 184
         }
185 185
 
186
-        return implode ( static::SEPARETOR , array_filter ( $arrNames ) );
186
+        return implode(static::SEPARETOR, array_filter($arrNames));
187 187
     }
188 188
 
189
-    public function __construct ( $array )
189
+    public function __construct($array)
190 190
     {
191 191
         $this->dataTypes = $this->dataTypes + self::$dataTypesDefault;
192
-        $array += array (
193
-            'version'     => Config::$version ,
194
-            'author'      => ucfirst ( get_current_user () ) ,
195
-            'last_modify' => date ( "d-m-Y H:i:s." )
192
+        $array += array(
193
+            'version'     => Config::$version,
194
+            'author'      => ucfirst(get_current_user()),
195
+            'last_modify' => date("d-m-Y H:i:s.")
196 196
         );
197 197
 
198
-        $this->setFrameworkFiles ( $array );
199
-        $this->parseFrameworkConfig ();
200
-        $this->setParams ( $this->getParams () );
201
-        $this->setParams ( $array );
202
-        $this->init ();
203
-        $this->validTableNames ();
204
-        if ( ! $this->isValid () )
198
+        $this->setFrameworkFiles($array);
199
+        $this->parseFrameworkConfig();
200
+        $this->setParams($this->getParams());
201
+        $this->setParams($array);
202
+        $this->init();
203
+        $this->validTableNames();
204
+        if ( ! $this->isValid())
205 205
         {
206
-            $var = array_diff_key ( $this->attRequered , array_filter ( $this->arrConfig ) );
207
-            throw new Exception( $var );
206
+            $var = array_diff_key($this->attRequered, array_filter($this->arrConfig));
207
+            throw new Exception($var);
208 208
         }
209 209
     }
210 210
 
@@ -213,43 +213,43 @@  discard block
 block discarded – undo
213 213
      *
214 214
      * @param $array
215 215
      */
216
-    public function setFrameworkFiles ( $array )
216
+    public function setFrameworkFiles($array)
217 217
     {
218
-        $this->framworkFiles[ 'library' ] = isset( $array[ 'framework-path-library' ] )
219
-            ? $array[ 'framework-path-library' ] : null;
218
+        $this->framworkFiles['library'] = isset($array['framework-path-library'])
219
+            ? $array['framework-path-library'] : null;
220 220
 
221
-        $this->framworkFiles[ 'ini' ] = isset( $array[ 'framework-ini' ] )
222
-            ? $array[ 'framework-ini' ] : null;
221
+        $this->framworkFiles['ini'] = isset($array['framework-ini'])
222
+            ? $array['framework-ini'] : null;
223 223
 
224
-        $this->framworkFiles[ 'environment' ] = isset( $array[ 'environment' ] )
225
-            ? $array[ 'environment' ] : 'production';
224
+        $this->framworkFiles['environment'] = isset($array['environment'])
225
+            ? $array['environment'] : 'production';
226 226
 
227 227
     }
228 228
 
229
-    protected function isValidFrameworkFiles ()
229
+    protected function isValidFrameworkFiles()
230 230
     {
231
-        if ( ! is_file ( $this->framworkFiles[ 'ini' ] ) )
231
+        if ( ! is_file($this->framworkFiles['ini']))
232 232
         {
233 233
             return false;
234 234
         }
235 235
 
236
-        if ( ! is_dir ( $this->framworkFiles[ 'library' ] ) )
236
+        if ( ! is_dir($this->framworkFiles['library']))
237 237
         {
238 238
             return false;
239 239
         }
240 240
 
241
-        if ( ! isset ( $this->framworkFiles[ 'environment' ] )
242
-             or empty( $this->framworkFiles[ 'environment' ] )
241
+        if ( ! isset ($this->framworkFiles['environment'])
242
+             or empty($this->framworkFiles['environment'])
243 243
         )
244 244
         {
245 245
             return false;
246 246
         }
247
-        set_include_path (
248
-            implode (
249
-                PATH_SEPARATOR ,
250
-                array (
251
-                    realpath ( $this->framworkFiles[ 'library' ] ) ,
252
-                    get_include_path () ,
247
+        set_include_path(
248
+            implode(
249
+                PATH_SEPARATOR,
250
+                array(
251
+                    realpath($this->framworkFiles['library']),
252
+                    get_include_path(),
253 253
                 )
254 254
             )
255 255
         );
@@ -257,119 +257,119 @@  discard block
 block discarded – undo
257 257
         return true;
258 258
     }
259 259
 
260
-    protected function getFrameworkIni ()
260
+    protected function getFrameworkIni()
261 261
     {
262
-        return $this->framworkFiles[ 'ini' ];
262
+        return $this->framworkFiles['ini'];
263 263
     }
264 264
 
265
-    protected function getEnvironment ()
265
+    protected function getEnvironment()
266 266
     {
267
-        return $this->framworkFiles[ 'environment' ];
267
+        return $this->framworkFiles['environment'];
268 268
     }
269 269
 
270 270
     /**
271 271
      * Popula as variaveis de acordo com o arquivo de configuração do seu  framework
272 272
      */
273
-    protected function isValid ()
273
+    protected function isValid()
274 274
     {
275
-        return $this->checkConfig ();
275
+        return $this->checkConfig();
276 276
     }
277 277
 
278
-    private function setParams ( $array )
278
+    private function setParams($array)
279 279
     {
280
-        if ( count ( $array ) > 0 )
280
+        if (count($array) > 0)
281 281
         {
282
-            $this->arrConfig = array_filter ( $array ) + $this->arrConfig;
282
+            $this->arrConfig = array_filter($array) + $this->arrConfig;
283 283
         }
284 284
     }
285 285
 
286 286
     /**
287 287
      * @return string
288 288
      */
289
-    public function getDatabase ()
289
+    public function getDatabase()
290 290
     {
291
-        return $this->arrConfig[ 'database' ];
291
+        return $this->arrConfig['database'];
292 292
     }
293 293
 
294 294
     /**
295 295
      * @return bool
296 296
      */
297
-    public function hasSchemas ()
297
+    public function hasSchemas()
298 298
     {
299
-        return ! empty ( $this->arrConfig[ 'schema' ] );
299
+        return ! empty ($this->arrConfig['schema']);
300 300
     }
301 301
 
302 302
     /**
303 303
      * @return string[]
304 304
      */
305
-    public function getSchemas ()
305
+    public function getSchemas()
306 306
     {
307
-        if ( is_string ( $this->arrConfig[ 'schema' ] ) )
307
+        if (is_string($this->arrConfig['schema']))
308 308
         {
309
-            return array ( $this->arrConfig[ 'schema' ] );
309
+            return array($this->arrConfig['schema']);
310 310
         }
311 311
 
312
-        return $this->arrConfig[ 'schema' ];
312
+        return $this->arrConfig['schema'];
313 313
     }
314 314
 
315
-    public function setSchema ( $schema )
315
+    public function setSchema($schema)
316 316
     {
317
-        $this->arrConfig[ 'schema' ] = $schema;
317
+        $this->arrConfig['schema'] = $schema;
318 318
     }
319 319
 
320 320
     /**
321 321
      * @return string
322 322
      */
323
-    public function getHost ()
323
+    public function getHost()
324 324
     {
325
-        return $this->arrConfig[ 'host' ];
325
+        return $this->arrConfig['host'];
326 326
     }
327 327
 
328 328
     /**
329 329
      * @return int
330 330
      */
331
-    public function getPort ()
331
+    public function getPort()
332 332
     {
333
-        return $this->arrConfig[ 'port' ];
333
+        return $this->arrConfig['port'];
334 334
     }
335 335
 
336 336
     /**
337 337
      * @return boolean
338 338
      */
339
-    public function hasPort ()
339
+    public function hasPort()
340 340
     {
341
-        return ! empty( $this->arrConfig[ 'port' ] );
341
+        return ! empty($this->arrConfig['port']);
342 342
     }
343 343
 
344 344
     /**
345 345
      * @return boolean
346 346
      */
347
-    public function isCleanTrash(){
348
-        return (boolean) $this->arrConfig[ 'clean-trash' ];
347
+    public function isCleanTrash() {
348
+        return (boolean) $this->arrConfig['clean-trash'];
349 349
     }
350 350
 
351 351
     /**
352 352
      * @return string
353 353
      */
354
-    public function getSocket ()
354
+    public function getSocket()
355 355
     {
356
-        return $this->arrConfig[ 'socket' ];
356
+        return $this->arrConfig['socket'];
357 357
     }
358 358
 
359 359
     /**
360 360
      * @return string
361 361
      */
362
-    public function getUser ()
362
+    public function getUser()
363 363
     {
364
-        return $this->arrConfig[ 'username' ];
364
+        return $this->arrConfig['username'];
365 365
     }
366 366
 
367 367
     /**
368 368
      * @return string
369 369
      */
370
-    public function getPassword ()
370
+    public function getPassword()
371 371
     {
372
-        return $this->arrConfig[ 'password' ];
372
+        return $this->arrConfig['password'];
373 373
     }
374 374
 
375 375
     /**
@@ -377,11 +377,11 @@  discard block
 block discarded – undo
377 377
      *
378 378
      * @return string
379 379
      */
380
-    public function replaceReservedWord ( $palavra )
380
+    public function replaceReservedWord($palavra)
381 381
     {
382
-        if ( isset( $this->reservedWord[ strtolower ( $palavra ) ] ) )
382
+        if (isset($this->reservedWord[strtolower($palavra)]))
383 383
         {
384
-            return $this->reservedWord[ strtolower ( $palavra ) ];
384
+            return $this->reservedWord[strtolower($palavra)];
385 385
         }
386 386
 
387 387
         return $palavra;
@@ -390,15 +390,15 @@  discard block
 block discarded – undo
390 390
     /**
391 391
      * @return bool
392 392
      */
393
-    public function isStatusEnabled ()
393
+    public function isStatusEnabled()
394 394
     {
395
-        return (bool) $this->arrConfig[ 'status' ];
395
+        return (bool) $this->arrConfig['status'];
396 396
     }
397 397
 
398
-    public function validTableNames ()
398
+    public function validTableNames()
399 399
     {
400
-        $matches = preg_grep ( '*\.*' , $this->getTablesName () );
401
-        if ( count ( $matches ) )
400
+        $matches = preg_grep('*\.*', $this->getTablesName());
401
+        if (count($matches))
402 402
         {
403 403
            die("\033[0;31mError: Table name must not contain the schema.\033[0m\n");
404 404
         }
@@ -407,28 +407,28 @@  discard block
 block discarded – undo
407 407
     /**
408 408
      * @return bool
409 409
      */
410
-    public function hasTablesName (){
411
-        return ! empty( $this->arrConfig[ 'tables' ] );
410
+    public function hasTablesName() {
411
+        return ! empty($this->arrConfig['tables']);
412 412
     }
413 413
 
414 414
     /**
415 415
      * @return string[]
416 416
      */
417
-    public function getTablesName ()
417
+    public function getTablesName()
418 418
     {
419
-        if ( is_string ( $this->arrConfig[ 'tables' ] ) )
419
+        if (is_string($this->arrConfig['tables']))
420 420
         {
421
-            return array ( $this->arrConfig[ 'tables' ] );
421
+            return array($this->arrConfig['tables']);
422 422
         }
423 423
 
424
-        return $this->arrConfig[ 'tables' ];
424
+        return $this->arrConfig['tables'];
425 425
     }
426 426
 
427 427
     /**
428 428
      * @return string
429 429
      */
430
-    public function getListTablesName(){
431
-        $str = implode("','", $this->getTablesName() );
430
+    public function getListTablesName() {
431
+        $str = implode("','", $this->getTablesName());
432 432
         return "'$str'";
433 433
     }
434 434
 
@@ -437,25 +437,25 @@  discard block
 block discarded – undo
437 437
      *
438 438
      * @return string
439 439
      */
440
-    public function __get ( $str )
440
+    public function __get($str)
441 441
     {
442
-        $arr = array (
443
-            'namespace' ,
444
-            'framework' ,
445
-            'author' ,
446
-            'license' ,
447
-            'version' ,
448
-            'copyright' ,
449
-            'link' ,
450
-            'last_modify' ,
451
-            'path' ,
452
-            'folder-database' ,
442
+        $arr = array(
443
+            'namespace',
444
+            'framework',
445
+            'author',
446
+            'license',
447
+            'version',
448
+            'copyright',
449
+            'link',
450
+            'last_modify',
451
+            'path',
452
+            'folder-database',
453 453
             'folder-name'
454 454
         );
455 455
 
456
-        if ( in_array ( $str , $arr ) )
456
+        if (in_array($str, $arr))
457 457
         {
458
-            return $this->arrConfig[ strtolower ( $str ) ];
458
+            return $this->arrConfig[strtolower($str)];
459 459
         }
460 460
 
461 461
         return;
@@ -466,9 +466,9 @@  discard block
 block discarded – undo
466 466
      *
467 467
      * @return string
468 468
      */
469
-    public static function convertTypeToPHP ( $type )
469
+    public static function convertTypeToPHP($type)
470 470
     {
471
-        return self::$dataTypesDefault[ $type ];
471
+        return self::$dataTypesDefault[$type];
472 472
     }
473 473
 
474 474
     /**
@@ -476,8 +476,8 @@  discard block
 block discarded – undo
476 476
      *
477 477
      * @return string
478 478
      */
479
-    public function convertTypeToTypeFramework ( $type )
479
+    public function convertTypeToTypeFramework($type)
480 480
     {
481
-        return $this->dataTypes[ $type ];
481
+        return $this->dataTypes[$type];
482 482
     }
483 483
 }
Please login to merge, or discard this patch.
build/Classes/AdapterMakerFile/Phalcon/Entity.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 (),
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     protected $fileTpl   = "entity.php";
21 21
     protected $overwrite = true;
22 22
 
23
-    protected $validFunc = array ();
23
+    protected $validFunc = array();
24 24
 
25 25
     private $intersectDependence = false;
26 26
 
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return array
32 32
      */
33
-    public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable )
33
+    public function parseRelation(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable)
34 34
     {
35
-        return array (
36
-            'mapParents'    => $this->listParents ( $makerFile, $dbTable ),
37
-            'mapDependents' => $this->listDependence ( $makerFile, $dbTable )
35
+        return array(
36
+            'mapParents'    => $this->listParents($makerFile, $dbTable),
37
+            'mapDependents' => $this->listDependence($makerFile, $dbTable)
38 38
         );
39 39
     }
40 40
 
@@ -44,26 +44,26 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @return array
46 46
      */
47
-    private function listParents ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable )
47
+    private function listParents(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable)
48 48
     {
49 49
         $mapParents = '';
50
-        $references = array ();
51
-        foreach ( $dbTable->getForeingkeys () as $objColumn ) {
52
-            $constrant    = $objColumn->getFks ();
53
-            $references[] = sprintf (
50
+        $references = array();
51
+        foreach ($dbTable->getForeingkeys() as $objColumn) {
52
+            $constrant    = $objColumn->getFks();
53
+            $references[] = sprintf(
54 54
                 '$this->belongsTo(\'%s\', \'%s\', \'%s\', array(\'alias\' => \'%s\'))',
55
-                $objColumn->getName (),
56
-                $makerFile->getConfig ()
57
-                          ->createClassNamespace ( $constrant ) . Phalcon::SEPARETOR . AbstractMaker::getClassName (
58
-                    $constrant->getTable ()
55
+                $objColumn->getName(),
56
+                $makerFile->getConfig()
57
+                          ->createClassNamespace($constrant) . Phalcon::SEPARETOR . AbstractMaker::getClassName(
58
+                    $constrant->getTable()
59 59
                 ),
60
-                $constrant->getColumn (),
61
-                AbstractMaker::getClassName ( $constrant->getTable () )
60
+                $constrant->getColumn(),
61
+                AbstractMaker::getClassName($constrant->getTable())
62 62
             );
63 63
         }
64 64
 
65
-        if ( sizeof ( $references ) > 0 ) {
66
-            $mapParents = join ( ";\n\t\t", $references ) . ";\n";
65
+        if (sizeof($references) > 0) {
66
+            $mapParents = join(";\n\t\t", $references) . ";\n";
67 67
         }
68 68
 
69 69
 
@@ -76,28 +76,28 @@  discard block
 block discarded – undo
76 76
      *
77 77
      * @return array
78 78
      */
79
-    private function listDependence ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable )
79
+    private function listDependence(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable)
80 80
     {
81 81
         $mapDependence = '';
82
-        $references    = array ();
83
-        foreach ( $dbTable->getDependences () as $objColumn ) {
84
-            foreach ( $objColumn->getDependences () as $dependence ) {
85
-                $references[] = sprintf (
82
+        $references    = array();
83
+        foreach ($dbTable->getDependences() as $objColumn) {
84
+            foreach ($objColumn->getDependences() as $dependence) {
85
+                $references[] = sprintf(
86 86
                     '$this->hasMany(\'%s\', \'%s\', \'%s\', array(\'alias\' => \'%s\'))',
87
-                    $objColumn->getName (),
88
-                    $makerFile->getConfig ()
89
-                              ->createClassNamespace ( $dependence )
87
+                    $objColumn->getName(),
88
+                    $makerFile->getConfig()
89
+                              ->createClassNamespace($dependence)
90 90
                     . Phalcon::SEPARETOR
91
-                    . AbstractMaker::getClassName ( $dependence->getTable () ),
92
-                    $dependence->getColumn (),
93
-                    AbstractMaker::getClassName ( $dependence->getTable () )
91
+                    . AbstractMaker::getClassName($dependence->getTable()),
92
+                    $dependence->getColumn(),
93
+                    AbstractMaker::getClassName($dependence->getTable())
94 94
                 );
95 95
 
96 96
             }
97 97
         }
98 98
 
99
-        if ( sizeof ( $references ) > 0 ) {
100
-            $mapDependence = join ( ";\n\t\t", $references ) . ";";
99
+        if (sizeof($references) > 0) {
100
+            $mapDependence = join(";\n\t\t", $references) . ";";
101 101
         }
102 102
 
103 103
         return $mapDependence;
Please login to merge, or discard this patch.
build/Classes/templates/phalcon/model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,22 +3,22 @@
 block discarded – undo
3 3
 /**
4 4
  * Data Model implementation for this class
5 5
  *
6
- * <?=$this->config->last_modify."\n"?>
6
+ * <?=$this->config->last_modify . "\n"?>
7 7
  *
8
- * @see  <?=$objTables->getNamespace()?>\<?=$this->getClassName ( $objTables->getName () ). "\n"?>
8
+ * @see  <?=$objTables->getNamespace()?>\<?=$this->getClassName($objTables->getName()) . "\n"?>
9 9
  *
10
- * @author    <?=$this->config->author."\n"?>
10
+ * @author    <?=$this->config->author . "\n"?>
11 11
  *
12
- * @copyright <?=$this->config->copyright."\n"?>
13
- * @license   <?=$this->config->license."\n"?>
14
- * @link      <?=$this->config->link."\n"?>
15
- * @version   <?=$this->config->version."\n"?>
12
+ * @copyright <?=$this->config->copyright . "\n"?>
13
+ * @license   <?=$this->config->license . "\n"?>
14
+ * @link      <?=$this->config->link . "\n"?>
15
+ * @version   <?=$this->config->version . "\n"?>
16 16
  */
17 17
 
18 18
 
19 19
 namespace <?=$objTables->getNamespace()?>;
20 20
 
21
-class <?=$this->getClassName ( $objTables->getName () )?> extends \<?=$objTables->getNamespace()?>\Entity\<?=$this->getClassName ( $objTables->getName () ). "\n"?>
21
+class <?=$this->getClassName($objTables->getName())?> extends \<?=$objTables->getNamespace()?>\Entity\<?=$this->getClassName($objTables->getName()) . "\n"?>
22 22
 {
23 23
        /* @TODO Codifique aqui */
24 24
 }
Please login to merge, or discard this patch.
build/Classes/templates/phalcon/peer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,28 +3,28 @@
 block discarded – undo
3 3
 /**
4 4
  * Mvc Model
5 5
  *
6
- * <?=$this->config->last_modify."\n"?>
6
+ * <?=$this->config->last_modify . "\n"?>
7 7
  *
8 8
  * @package   <?=$objTables->getNamespace()?>\Peer
9 9
  * @subpackage Model
10
- * @author    <?=$this->config->author."\n"?>
10
+ * @author    <?=$this->config->author . "\n"?>
11 11
  *
12
- * @copyright <?=$this->config->copyright."\n"?>
13
- * @license   <?=$this->config->license."\n"?>
14
- * @link      <?=$this->config->link."\n"?>
15
- * @version   <?=$this->config->version."\n"?>
12
+ * @copyright <?=$this->config->copyright . "\n"?>
13
+ * @license   <?=$this->config->license . "\n"?>
14
+ * @link      <?=$this->config->link . "\n"?>
15
+ * @version   <?=$this->config->version . "\n"?>
16 16
  */
17 17
 
18 18
 namespace  <?=$objTables->getNamespace()?>\Peer;
19 19
 
20
-class <?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends \<?=$this->config->namespace?$this->config->namespace."\\":""?>Models\<?=$objMakeFile->getParentClass() . "\n"?>
20
+class <?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends \<?=$this->config->namespace ? $this->config->namespace . "\\" : ""?>Models\<?=$objMakeFile->getParentClass() . "\n"?>
21 21
 {
22 22
     /**
23 23
     * Name of the object for static instance
24 24
     *
25 25
     * @var string $className
26 26
     */
27
-    protected static $className = '<?=$objTables->getNamespace()?>\<?=$this->getClassName ( $objTables->getName () )?>';
27
+    protected static $className = '<?=$objTables->getNamespace()?>\<?=$this->getClassName($objTables->getName())?>';
28 28
 
29 29
     /* @TODO Codifique aqui */
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
build/Classes/templates/phalcon/peer_abstract.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@
 block discarded – undo
3 3
 /**
4 4
  * Mvc Model
5 5
  *
6
- * <?=$this->config->last_modify."\n"?>
6
+ * <?=$this->config->last_modify . "\n"?>
7 7
  *
8 8
  * @package   <?=$this->config->namespace?>\Models
9 9
  * @subpackage Model
10
- * @author    <?=$this->config->author."\n"?>
10
+ * @author    <?=$this->config->author . "\n"?>
11 11
  *
12
- * @copyright <?=$this->config->copyright."\n"?>
13
- * @license   <?=$this->config->license."\n"?>
14
- * @link      <?=$this->config->link."\n"?>
15
- * @version   <?=$this->config->version."\n"?>
12
+ * @copyright <?=$this->config->copyright . "\n"?>
13
+ * @license   <?=$this->config->license . "\n"?>
14
+ * @link      <?=$this->config->link . "\n"?>
15
+ * @version   <?=$this->config->version . "\n"?>
16 16
  */
17 17
 
18
-namespace  <?=$this->config->namespace?$this->config->namespace."\\":""?>Models;
18
+namespace  <?=$this->config->namespace ? $this->config->namespace . "\\" : ""?>Models;
19 19
 
20 20
 abstract class AbstractPeer
21 21
 {
Please login to merge, or discard this patch.