Passed
Push — master ( a9c589...2ec39b )
by Roberto
03:10
created
src/Common/FakePretty.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public static function prettyPrint($response, $save = '')
14 14
     {
15 15
         $std = json_decode($response);
16
-        if (! empty($save)) {
16
+        if (!empty($save)) {
17 17
             file_put_contents(
18 18
                 "$save.xml",
19 19
                 $std->body
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $html .= $std->header;
47 47
         $html .= "<br>";
48 48
         $html .= '<h2>namespaces</h2>';
49
-        $an   = json_decode(json_encode($std->namespaces), true);
49
+        $an = json_decode(json_encode($std->namespaces), true);
50 50
         foreach ($an as $key => $nam) {
51 51
             $html .= "[$key] => $nam <br>";
52 52
         }
Please login to merge, or discard this patch.
src/Common/Standardize.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function toStd($xml = null)
62 62
     {
63
-        if (! empty($xml)) {
63
+        if (!empty($xml)) {
64 64
             $this->whichIs($xml);
65 65
         }
66 66
         $sxml       = simplexml_load_string($this->node);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function whichIs($xml)
83 83
     {
84
-        if (! Validator::isXML($xml)) {
84
+        if (!Validator::isXML($xml)) {
85 85
             throw new InvalidArgumentException(
86 86
                 "O argumento passado não é um XML válido."
87 87
             );
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
         $dom->formatOutput = false;
92 92
         $dom->loadXML($xml);
93 93
         foreach ($this->rootTagList as $key) {
94
-            $node = ! empty($dom->getElementsByTagName($key)->item(0))
94
+            $node = !empty($dom->getElementsByTagName($key)->item(0))
95 95
                 ? $dom->getElementsByTagName($key)->item(0)
96 96
                 : '';
97
-            if (! empty($node)) {
97
+            if (!empty($node)) {
98 98
                 $this->node = $dom->saveXML($node);
99 99
                 return $key;
100 100
             }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function toJson($xml = null)
122 122
     {
123
-        if (! empty($xml)) {
123
+        if (!empty($xml)) {
124 124
             $this->toStd($xml);
125 125
         }
126 126
         return $this->json;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function toYaml($xml = null)
135 135
     {
136
-        if (! empty($xml)) {
136
+        if (!empty($xml)) {
137 137
             $this->toStd($xml);
138 138
         }
139 139
         $array = $this->toArray();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function toArray($xml = null)
149 149
     {
150
-        if (! empty($xml)) {
150
+        if (!empty($xml)) {
151 151
             $this->toStd($xml);
152 152
         }
153 153
         return json_decode($this->json, true);
Please login to merge, or discard this patch.
src/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
         }
195 195
         foreach ($eventos as $evt) {
196 196
             //verifica se o evento pertence ao grupo indicado
197
-            if (! in_array($evt->alias(), $this->grupos[$grupo])) {
197
+            if (!in_array($evt->alias(), $this->grupos[$grupo])) {
198 198
                 throw new RuntimeException(
199 199
                     'O evento ' . $evt->alias() . ' não pertence a este grupo [ '
200 200
                     . $this->eventGroup[$grupo] . ' ].'
Please login to merge, or discard this patch.
src/Common/ParamsStandardize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                     $ref = '';
109 109
                 }
110 110
                 if ($prop->type == 'object') {
111
-                    if (! empty($ref)) {
111
+                    if (!empty($ref)) {
112 112
                         $ref .= ":$name";
113 113
                     } else {
114 114
                         $ref = $name;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 } else {
118 118
                     $comm = "\$clone->";
119 119
                     $orig = "\$data->";
120
-                    if (! empty($ref)) {
120
+                    if (!empty($ref)) {
121 121
                         $part = explode(':', $ref);
122 122
                         $num  = count($part);
123 123
                         foreach ($part as $p) {
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
                             $orig .= "$p->";
126 126
                         }
127 127
                         $exist = false;
128
-                        $test  = "\$exist = (!empty(".substr($orig, 0, strlen($orig) - 2).")) ? true : false;";
128
+                        $test  = "\$exist = (!empty(" . substr($orig, 0, strlen($orig) - 2) . ")) ? true : false;";
129 129
                         eval($test);
130 130
                     }
131 131
                     $orig .= $name;
132 132
                     $resp = null;
133 133
                     eval("\$resp = $orig;");
134 134
 
135
-                    if (! empty($resp) || $resp === 0) {
136
-                        $comm .= $name.'= $resp';
135
+                    if (!empty($resp) || $resp === 0) {
136
+                        $comm .= $name . '= $resp';
137 137
                     } else {
138 138
                         $comm .= "$name = null";
139 139
                     }
Please login to merge, or discard this patch.
src/Factories/EvtAltContratual.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $this->dom->addChild(
77 77
             $ideEvento,
78 78
             "nrRecibo",
79
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
79
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
80 80
             false
81 81
         );
82 82
         $this->dom->addChild(
Please login to merge, or discard this patch.
src/Factories/EvtAltCadastral.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $this->dom->addChild(
77 77
             $ideEvento,
78 78
             "nrRecibo",
79
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
79
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
80 80
             false
81 81
         );
82 82
         $this->dom->addChild(
Please login to merge, or discard this patch.
src/Factories/EvtCAT.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $this->dom->addChild(
77 77
             $ideEvento,
78 78
             "nrRecibo",
79
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
79
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
80 80
             false
81 81
         );
82 82
         $this->dom->addChild(
Please login to merge, or discard this patch.
src/Factories/EvtTSVTermino.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $this->dom->addChild(
77 77
             $ideEvento,
78 78
             "nrRecibo",
79
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
79
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
80 80
             false
81 81
         );
82 82
         $this->dom->addChild(
Please login to merge, or discard this patch.
src/Factories/EvtTSVInicio.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $this->dom->addChild(
77 77
             $ideEvento,
78 78
             "nrRecibo",
79
-            ! empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
79
+            !empty($this->std->nrrecibo) ? $this->std->nrrecibo : null,
80 80
             false
81 81
         );
82 82
         $this->dom->addChild(
Please login to merge, or discard this patch.