Completed
Push — master ( 4546ab...42948b )
by Mihail
04:43
created
src/Ffcms/Core/Debug/LaravelDatabaseCollector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function setFindSource($value = true)
81 81
     {
82
-        $this->findSource = (bool) $value;
82
+        $this->findSource = (bool)$value;
83 83
     }
84 84
 
85 85
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     public function setExplainSource($enabled, $types)
92 92
     {
93 93
         $this->explainQuery = $enabled;
94
-        if($types){
94
+        if ($types) {
95 95
             $this->explainTypes = $types;
96 96
         }
97 97
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $hints[] = '<code>LIMIT</code> without <code>ORDER BY</code> causes non-deterministic results, depending on the query execution plan';
161 161
         }
162 162
         if (preg_match('/LIKE\\s[\'"](%.*?)[\'"]/i', $query, $matches)) {
163
-            $hints[] = 	'An argument has a leading wildcard character: <code>' . $matches[1]. '</code>.
163
+            $hints[] = 'An argument has a leading wildcard character: <code>' . $matches[1] . '</code>.
164 164
 								The predicate with this argument is not sargable and cannot use an index if one exists.';
165 165
         }
166 166
         return implode("<br />", $hints);
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
             $totalTime += $query['time'];
243 243
 
244 244
             $bindings = $query['bindings'];
245
-            if($query['hints']){
245
+            if ($query['hints']) {
246 246
                 $bindings['hints'] = $query['hints'];
247 247
             }
248 248
 
249 249
             $statements[] = array(
250 250
                 'sql' => $this->formatSql($query['query']),
251
-                'params' => (object) $bindings,
251
+                'params' => (object)$bindings,
252 252
                 'duration' => $query['time'],
253 253
                 'duration_str' => $this->formatDuration($query['time']),
254 254
                 'stmt_id' => $query['source'],
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Date.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
         try {
28 28
             $object = new \DateTime($rawDate);
29 29
             return $object->format($format);
30
-        } catch(\Exception $e) {
30
+        } catch (\Exception $e) {
31 31
             return false;
32 32
         }
33 33
     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/FileSystem/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
         $path = Normalize::diskFullPath($path);
142 142
 
143 143
         $dir = opendir($path . '/.');
144
-        while($item = readdir($dir)) {
144
+        while ($item = readdir($dir)) {
145 145
             if (is_file($sub = $path . '/' . $item)) {
146 146
                 $item_ext = Str::lastIn($item, '.');
147 147
                 if ($ext === null || Arr::in($item_ext, $ext)) {
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         // sounds like a array-path based
174 174
         if (Str::contains('.', $name)) {
175 175
             $splitedName = explode('.', $name);
176
-            foreach($splitedName as $nameKey) {
176
+            foreach ($splitedName as $nameKey) {
177 177
                 $property['name'] .= '[' . $nameKey . ']';
178 178
                 $property['id'] .= '-' . $nameKey;
179 179
             }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     }
226 226
                     $property['value'] = $opt;
227 227
                     // apply structured checkboxes style for each item
228
-                    $buildCheckboxes .= Str::replace('%item%' , self::buildSingleTag('input', $property) . self::nohtml($opt), $this->structureCheckboxes);
228
+                    $buildCheckboxes .= Str::replace('%item%', self::buildSingleTag('input', $property) . self::nohtml($opt), $this->structureCheckboxes);
229 229
                 }
230 230
 
231 231
                 $response = $buildCheckboxes;
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/SimplePagination.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
     public function display(array $property = null)
33 33
     {
34 34
         // total items is less to pagination requirement
35
-        if (($this->page * $this->step)+1 > $this->total) {
35
+        if (($this->page * $this->step) + 1 > $this->total) {
36 36
             return null;
37 37
         }
38 38
 
39
-        $lastPage = ceil($this->total/$this->step); // 6/5 ~ 2 = 0..2
39
+        $lastPage = ceil($this->total / $this->step); // 6/5 ~ 2 = 0..2
40 40
 
41 41
         if ($lastPage <= 1) {
42 42
             return null;
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
                     'type' => 'link', 'link' => '#', 'text' => '...', 'property' => ['class' => 'disabled']
60 60
                 ];
61 61
                 // add middle page
62
-                $middlePage = ceil($lastPage/2);
62
+                $middlePage = ceil($lastPage / 2);
63 63
                 $items[] = [
64
-                    'type' => 'link', 'link' => $this->setUrlPage($middlePage), 'text' => $middlePage+1
64
+                    'type' => 'link', 'link' => $this->setUrlPage($middlePage), 'text' => $middlePage + 1
65 65
                 ];
66 66
                 // add "..." button
67 67
                 $items[] = [
68 68
                     'type' => 'link', 'link' => '#', 'text' => '...', 'property' => ['class' => 'disabled']
69 69
                 ];
70
-                $items = Arr::merge($items, $this->generateItems($lastPage-4, $lastPage));
70
+                $items = Arr::merge($items, $this->generateItems($lastPage - 4, $lastPage));
71 71
             } else { // meanwhile on middle
72 72
                 // generate 1-2 pages
73 73
                 $items = $this->generateItems(0, 2);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 ];
79 79
 
80 80
                 // add middle variance -3..mid..+3
81
-                $items = Arr::merge($items, $this->generateItems($this->page-3, $this->page+3));
81
+                $items = Arr::merge($items, $this->generateItems($this->page - 3, $this->page + 3));
82 82
 
83 83
                 // add "..." button
84 84
                 $items[] = [
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 ];
87 87
 
88 88
                 // add latest 2 items
89
-                $items = Arr::merge($items, $this->generateItems($lastPage-2, $lastPage));
89
+                $items = Arr::merge($items, $this->generateItems($lastPage - 2, $lastPage));
90 90
             }
91 91
 
92 92
         } else { // less then 10 items in pagination
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $items = [];
142 142
         for ($i = $start; $i < $end; $i++) {
143 143
             $items[] = [
144
-                'type' => 'link', 'link' => $this->setUrlPage($i), 'text' => $i+1
144
+                'type' => 'link', 'link' => $this->setUrlPage($i), 'text' => $i + 1
145 145
             ];
146 146
         }
147 147
         return $items;
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             $theadItems .= '<tr>';
63 63
             if (Obj::isArray($elements['thead']['titles']) && count($elements['thead']['titles']) > 0) {
64 64
                 foreach ($elements['thead']['titles'] as $order => $title) {
65
-                    if ($selectOptions !== false && $order+1 === $selectOptions['attachOrder']) {
65
+                    if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) {
66 66
                         $title['text'] = self::buildSingleTag('input', ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $title['text'];
67 67
                         $title['html'] = true;
68 68
                     }
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/Type/Arr.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      * Alternative var_export function for php >= 5.4 syntax
95 95
      * @param $var
96 96
      * @param null $indent
97
-     * @return mixed|string
97
+     * @return string
98 98
      */
99 99
     public function var_export54($var, $indent = null, $guessTypes = false) {
100 100
         switch (gettype($var)) {
Please login to merge, or discard this patch.
src/Ffcms/Core/Arch/Controller.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ffcms\Core\App;
6 6
 use Ffcms\Core\Exception\NativeException;
7 7
 use Ffcms\Core\Helper\FileSystem\File;
8
-use Ffcms\Core\Helper\Type\Obj;
9 8
 use Ffcms\Core\Helper\Type\Str;
10 9
 use Ffcms\Core\Traits\DynamicGlobal;
11 10
 use Ffcms\Core\Template\Variables;
Please login to merge, or discard this patch.
src/Ffcms/Core/Helper/HTML/Listing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,6 +164,6 @@
 block discarded – undo
164 164
             $items .= '</li>';
165 165
         }
166 166
 
167
-        return '<' . $elements['type'] . $ulProperties . '>' . $items . '</' . $elements['type'] .  '>';
167
+        return '<' . $elements['type'] . $ulProperties . '>' . $items . '</' . $elements['type'] . '>';
168 168
     }
169 169
 }
170 170
\ No newline at end of file
Please login to merge, or discard this patch.