Completed
Push — master ( 1857e6...d96bec )
by Joao Gilberto
03:02
created
src/Database/SQLHelper.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -152,6 +152,9 @@
 block discarded – undo
152 152
         $this->_fieldDeliRight = $right;
153 153
     }
154 154
 
155
+    /**
156
+     * @param string $sql
157
+     */
155 158
     public static function createSafeSQL($sql, $list)
156 159
     {
157 160
         foreach ($list as $key => $value) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
                 if ($sql != "") {
58 58
                     $sql .= ", ";
59 59
                 }
60
-                $sql .= " " . $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight . " = " . $this->getValue($fieldname,
61
-                        $fieldvalue, $param, $decimalpoint) . " ";
60
+                $sql .= " ".$this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight." = ".$this->getValue($fieldname,
61
+                        $fieldvalue, $param, $decimalpoint)." ";
62 62
             }
63 63
             $sql = "update $table set $sql where $filter ";
64 64
         } elseif ($type == SQLType::SQL_INSERT) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                     $campos .= ", ";
70 70
                     $valores .= ", ";
71 71
                 }
72
-                $campos .= $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight;
72
+                $campos .= $this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight;
73 73
                 $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint);
74 74
             }
75 75
             $sql = "insert into $table ($campos) values ($valores)";
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     protected function getValue($name, $valores, &$param, $decimalpoint)
95 95
     {
96
-        $paramName = "[[" . $name . "]]";
96
+        $paramName = "[[".$name."]]";
97 97
         if (!is_array($valores)) {
98 98
             $valores = array(SQLFieldType::TEXT, $valores);
99 99
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         } elseif ($valores[0] == SQLFieldType::DATE) {
114 114
             $date = ($valores[1] instanceof DateTime ? $valores[1]->format(DBBaseFunctions::YMDH) : $valores[1]);
115 115
             $param[$name] = $date;
116
-            if (($this->_db->getDbType() == 'oci8') || ( ($this->_db->getDbType() == 'dsn') && (strpos($this->_db->getDbConnectionString(),
116
+            if (($this->_db->getDbType() == 'oci8') || (($this->_db->getDbType() == 'dsn') && (strpos($this->_db->getDbConnectionString(),
117 117
                     "oci8")))) {
118 118
                 return "TO_DATE($paramName, 'YYYY-MM-DD')";
119 119
             } else {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         if (strlen($sql) > 4) {
144 144
             $sql .= ' and ';
145 145
         }
146
-        $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.');
146
+        $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.');
147 147
     }
148 148
 
149 149
     public function setFieldDelimeters($left, $right)
Please login to merge, or discard this patch.
src/Model/Annotations.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
     protected $annotations;
12 12
     
13 13
 
14
+    /**
15
+     * @param string $key
16
+     */
14 17
     public function getAnnotations($key = null, $default = null)
15 18
     {
16 19
         if ($key == null) {
Please login to merge, or discard this patch.
src/Model/PropertyAnnotations.php 2 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -20,6 +20,11 @@
 block discarded – undo
20 20
     protected $property;  // Reflection objet
21 21
     protected $classAnnotation;
22 22
 
23
+    /**
24
+     * @param string $config
25
+     * @param ReflectionProperty $property
26
+     * @param string|null $propertyName
27
+     */
23 28
     public function __construct(ClassAnnotations $classAnnotation, $config, $property, $propertyName)
24 29
     {
25 30
         $this->config = $config;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     protected $propForceName;
18 18
     protected $propValue;
19 19
 
20
-    protected $property;  // Reflection objet
20
+    protected $property; // Reflection objet
21 21
     protected $classAnnotation;
22 22
 
23 23
     public function __construct(ClassAnnotations $classAnnotation, $config, $property, $propertyName)
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                 $this->propName = substr($this->propName, 1);
51 51
             }
52 52
 
53
-            $methodName = $this->classAnnotation->getClassGetter() . ucfirst(preg_replace($this->classAnnotation->getClassPropertyPattern(0),
53
+            $methodName = $this->classAnnotation->getClassGetter().ucfirst(preg_replace($this->classAnnotation->getClassPropertyPattern(0),
54 54
                         $this->classAnnotation->getClassPropertyPattern(1), $this->propName));
55 55
 
56 56
             if ($this->classAnnotation->getClassRefl()->hasMethod($methodName)) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->annotations = $this->adjustParams($aux);
64 64
         $this->propName = $this->getAnnotations('nodename', $this->propName);
65 65
         if (strpos($this->propName, ":") === false) {
66
-            $this->propName = $this->classAnnotation->getClassDefaultPrefix() . $this->propName;
66
+            $this->propName = $this->classAnnotation->getClassDefaultPrefix().$this->propName;
67 67
         }
68 68
     }
69 69
 
Please login to merge, or discard this patch.
src/Repository/AnyDataset.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -308,6 +308,10 @@  discard block
 block discarded – undo
308 308
         return;
309 309
     }
310 310
 
311
+    /**
312
+     * @param SingleRow[] $seq
313
+     * @param string $field
314
+     */
311 315
     protected function quickSortExec($seq, $field)
312 316
     {
313 317
         if (!count($seq)) return $seq;
@@ -329,7 +333,7 @@  discard block
 block discarded – undo
329 333
 
330 334
     /**
331 335
      * @param $document
332
-     * @return array|string
336
+     * @return string
333 337
      */
334 338
     public static function fixUTF8($document)
335 339
     {
Please login to merge, or discard this patch.
src/Repository/IteratorFilter.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     /**
73 73
      *
74
-     * @param $array
74
+     * @param SingleRow[] $array
75 75
      * @return SingleRow[]
76 76
      */
77 77
     public function match($array)
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     /**
242 242
      *
243 243
      * @param string[] $array
244
-     * @return string
244
+     * @return boolean
245 245
      */
246 246
     private function evalString($array)
247 247
     {
Please login to merge, or discard this patch.
src/Repository/SocketIterator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      *
17 17
      * @param resource $handle
18
-     * @param array $fieldnames
18
+     * @param string $fieldnames
19 19
      * @param string $rowsep
20 20
      * @param string $colsep
21 21
      */
Please login to merge, or discard this patch.
src/Repository/XmlDataset.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
     /**
73 73
      * @access public
74
-     * @return DBIterator
74
+     * @return XmlIterator
75 75
      */
76 76
     public function getIterator()
77 77
     {
Please login to merge, or discard this patch.
src/Repository/XmlIterator.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -32,6 +32,11 @@
 block discarded – undo
32 32
     private $_current = 0;
33 33
     protected $_registerNS;
34 34
 
35
+    /**
36
+     * @param DOMNodeList $nodeList
37
+     * @param string[] $colNodes
38
+     * @param string $registerNS
39
+     */
35 40
     public function __construct($nodeList, $colNodes, $registerNS)
36 41
     {
37 42
         if (!($nodeList instanceof DOMNodeList)) {
Please login to merge, or discard this patch.
src/Database/DBPgsqlFunctions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
         $sql = "";
11 11
         for ($i = 0, $numArgs = func_num_args(); $i < $numArgs; $i++) {
12 12
             $var = func_get_arg($i);
13
-            $sql .= ($i == 0 ? "" : " || ") . $var;
13
+            $sql .= ($i == 0 ? "" : " || ").$var;
14 14
         }
15 15
 
16 16
         return $sql;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     function limit($sql, $start, $qty)
27 27
     {
28 28
         if (strpos($sql, ' LIMIT ') === false) {
29
-            return $sql . " LIMIT $qty OFFSET $start ";
29
+            return $sql." LIMIT $qty OFFSET $start ";
30 30
         } else {
31 31
             return $sql;
32 32
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     function sqlDate($fmt, $col = false)
72 72
     {
73 73
         if (!$col) $col = $this->sysTimeStamp;
74
-        $s = 'TO_CHAR(' . $col . ",'";
74
+        $s = 'TO_CHAR('.$col.",'";
75 75
 
76 76
         $len = strlen($fmt);
77 77
         for ($i = 0; $i < $len; $i++) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     break;
100 100
 
101 101
                 case 'H':
102
-                    $s.= 'HH24';
102
+                    $s .= 'HH24';
103 103
                     break;
104 104
 
105 105
                 case 'h':
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
                     if (strpos('-/.:;, ', $ch) !== false) {
129 129
                         $s .= $ch;
130 130
                     } else {
131
-                        $s .= '"' . $ch . '"';
131
+                        $s .= '"'.$ch.'"';
132 132
                     }
133 133
             }
134 134
         }
135
-        return $s . "')";
135
+        return $s."')";
136 136
     }
137 137
 
138 138
     /**
Please login to merge, or discard this patch.