Completed
Push — master ( 1857e6...d96bec )
by Joao
03:02
created
src/Repository/SocketIterator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
         }
43 43
 
44 44
         $this->_rows = array();
45
-        $rowsaux = preg_split("/" . $this->_rowsep . "/", $linha);
45
+        $rowsaux = preg_split("/".$this->_rowsep."/", $linha);
46 46
         sort($rowsaux);
47 47
         foreach ($rowsaux as $key => $value) {
48
-            $colsaux = preg_split("/" . $this->_colsep . "/", $value);
48
+            $colsaux = preg_split("/".$this->_colsep."/", $value);
49 49
             if (sizeof($colsaux) == sizeof($fieldnames)) {
50 50
                 $this->_rows[] = $value;
51 51
             }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function moveNext()
80 80
     {
81
-        $cols = preg_split("/" . $this->_colsep . "/", $this->_rows[$this->_current]);
81
+        $cols = preg_split("/".$this->_colsep."/", $this->_rows[$this->_current]);
82 82
         $this->_current++;
83 83
 
84 84
         $sr = new SingleRow();
Please login to merge, or discard this 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/SingleRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
         if (is_array($this->_row)) {
219 219
             return json_decode(json_encode($this->_row));
220 220
         } else {
221
-            throw new UnexpectedValueException('I expected that getRawFormat is array() but ' . gettype($this->_row) . ' was given');
221
+            throw new UnexpectedValueException('I expected that getRawFormat is array() but '.gettype($this->_row).' was given');
222 222
         }
223 223
     }
224 224
 
Please login to merge, or discard this patch.
src/Repository/SparQLDataset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         }
28 28
 
29 29
         if (function_exists('dba_open')) {
30
-            $cache = sys_get_temp_dir() . "/caps.db";
30
+            $cache = sys_get_temp_dir()."/caps.db";
31 31
             $this->_db->capabilityCache($cache);
32 32
         }
33 33
     }
Please login to merge, or discard this patch.
src/Repository/TextFileDataset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $this->_source = $source;
41 41
 
42 42
             if (!file_exists($this->_source)) {
43
-                throw new NotFoundException("The specified file " . $this->_source . " does not exists");
43
+                throw new NotFoundException("The specified file ".$this->_source." does not exists");
44 44
             }
45 45
 
46 46
             $this->_sourceType = "FILE";
Please login to merge, or discard this patch.
src/Repository/FixedTextFileDataset.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         if (!preg_match("~^https?://~", $source)) {
40 40
             if (!file_exists($this->_source)) {
41
-                throw new NotFoundException("The specified file " . $this->_source . " does not exists");
41
+                throw new NotFoundException("The specified file ".$this->_source." does not exists");
42 42
             }
43 43
 
44 44
             $this->_sourceType = "FILE";
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         if (!$handle) {
76 76
             throw new DatasetException("TextFileDataset Socket error: $errstr ($errno)");
77 77
         } else {
78
-            $out = "GET " . $urlParts[4] . " HTTP/1.1\r\n";
79
-            $out .= "Host: " . $urlParts[2] . "\r\n";
78
+            $out = "GET ".$urlParts[4]." HTTP/1.1\r\n";
79
+            $out .= "Host: ".$urlParts[2]."\r\n";
80 80
             $out .= "Connection: Close\r\n\r\n";
81 81
 
82 82
             fwrite($handle, $out);
Please login to merge, or discard this patch.
src/Repository/CachedDBDataset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
 
49 49
         // Define the query key
50 50
         if (is_array($arKey2) && count($arKey2) > 0) {
51
-            $key2 = ":" . md5(json_encode($arKey2));
51
+            $key2 = ":".md5(json_encode($arKey2));
52 52
         } else {
53 53
             $key2 = "";
54 54
         }
55
-        $key = "qry:" . $key1 . $key2;
55
+        $key = "qry:".$key1.$key2;
56 56
 
57 57
         // Get the CACHE
58 58
         $cache = $this->_cacheEngine->get($key, $ttl);
Please login to merge, or discard this patch.
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.