Completed
Push — master ( a7d9d9...95985f )
by Vitaliy
06:23 queued 04:24
created
src/Components/Container.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
     {
18 18
         $before = '';
19 19
         $after = '';
20
-        foreach($this->html_tags as $tag) {
21
-            $before.="<$tag>";
20
+        foreach ($this->html_tags as $tag) {
21
+            $before .= "<$tag>";
22 22
             $after = "</$tag>".$after;
23 23
         }
24
-        return $before . $this->renderComponents() . $after;
24
+        return $before.$this->renderComponents().$after;
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
src/Components/TableCell.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function getAttributes()
32 32
     {
33 33
         if (empty($this->attributes['class'])) {
34
-            $this->attributes['class'] = 'column-' . $this->getColumn()->getName();
34
+            $this->attributes['class'] = 'column-'.$this->getColumn()->getName();
35 35
         }
36 36
         if ($this->column->isHidden()) {
37 37
             $this->attributes['style'] = 'display:none;';
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function getName()
49 49
     {
50
-        return $this->name ? : 'column_' . $this->column->getName();
50
+        return $this->name ?: 'column_'.$this->column->getName();
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
src/Components/Filters/DateRangePicker.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $from_input = $this
85 85
             ->grid
86 86
             ->getInputProcessor()
87
-            ->getFilterValue($this->name . '_start');
87
+            ->getFilterValue($this->name.'_start');
88 88
         if ($from_input === null) {
89 89
             return $this->getDefaultStartValue();
90 90
         } else {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $from_input = $this
99 99
             ->grid
100 100
             ->getInputProcessor()
101
-            ->getFilterValue($this->name . '_end');
101
+            ->getFilterValue($this->name.'_end');
102 102
         if ($from_input === null) {
103 103
             return $this->getDefaultEndValue();
104 104
         } else {
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
             'format' => 'YYYY-MM-DD',
140 140
             'ranges' => [
141 141
                 'previous_month' => [
142
-                    'Previous month (' . $prev_month->format('F') . ')',
142
+                    'Previous month ('.$prev_month->format('F').')',
143 143
                     [
144 144
                         $prev_month->startOfMonth()->format('Y-m-d'),
145 145
                         $prev_month->endOfMonth()->format('Y-m-d'),
146 146
                     ]
147 147
                 ],
148 148
                 'current_month' => [
149
-                    'Cur. month (' . date('F'). ')',
149
+                    'Cur. month ('.date('F').')',
150 150
                     [
151 151
                         $carbon->startOfMonth()->format('Y-m-d'),
152 152
                         $carbon->endOfMonth()->format('Y-m-d')
Please login to merge, or discard this patch.
src/Grid.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             if (empty($trace['class']) || !$this instanceof $trace['class']) {
99 99
                 # may be closure
100 100
                 if (isset($trace['file'], $trace['line'])) {
101
-                    $str .= $trace['file'] . $trace['line'];
101
+                    $str .= $trace['file'].$trace['line'];
102 102
                 }
103 103
             }
104 104
         }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     protected function sortColumns()
127 127
     {
128
-        $this->config->getColumns()->sort(function (FieldConfig $a, FieldConfig $b) {
128
+        $this->config->getColumns()->sort(function(FieldConfig $a, FieldConfig $b) {
129 129
             return $a->getOrder() > $b->getOrder();
130 130
         });
131 131
     }
Please login to merge, or discard this patch.
src/GridInputProcessor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getSorting()
69 69
     {
70
-        return $_ =& $this->input['sort'];
70
+        return $_ = & $this->input['sort'];
71 71
     }
72 72
 
73 73
     public function getSortingHiddenInputsHtml()
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
         $cookies_str = '';
96 96
         foreach ($_COOKIE as $key => $val) {
97 97
             if (strpos($key, $this->getKey()) !== false) {
98
-                $cookies_str .= $key . json_encode($val);
98
+                $cookies_str .= $key.json_encode($val);
99 99
             }
100 100
         }
101 101
 
102
-        return md5($cookies_str . $this->getKey() . json_encode($this->getInput()));
102
+        return md5($cookies_str.$this->getKey().json_encode($this->getInput()));
103 103
     }
104 104
 
105 105
     /**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     public function getUrl(array $new_params = [])
190 190
     {
191 191
         if (null !== $query_string = $this->getQueryString($new_params)) {
192
-            $query_string = '?' . $query_string;
192
+            $query_string = '?'.$query_string;
193 193
         }
194 194
         $request = Request::instance();
195 195
         return $request->getSchemeAndHttpHost()
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function boot()
32 32
     {
33 33
         $pkg_path = dirname(__DIR__);
34
-        $views_path = $pkg_path . '/resources/views';
34
+        $views_path = $pkg_path.'/resources/views';
35 35
 
36 36
         # only for Laravel 4 & some of 5-dev
37 37
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $this->app['view']->addNamespace('grids', $views_path);
40 40
         } else {
41 41
             $this->loadViewsFrom($views_path, 'grids');
42
-            $this->loadTranslationsFrom($pkg_path . '/resources/lang', 'grids');
42
+            $this->loadTranslationsFrom($pkg_path.'/resources/lang', 'grids');
43 43
             $this->publishes([
44 44
                 $views_path => base_path('resources/views/vendor/grids')
45 45
             ]);
Please login to merge, or discard this patch.
src/Components/CsvExport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function initialize(Grid $grid)
51 51
     {
52 52
         parent::initialize($grid);
53
-        Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) {
53
+        Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) {
54 54
             if ($this->grid !== $grid) {
55 55
                 return;
56 56
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function getFileName()
77 77
     {
78
-        return $this->fileName . static::CSV_EXT;
78
+        return $this->fileName.static::CSV_EXT;
79 79
     }
80 80
 
81 81
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     protected function setCsvHeaders(Response $response)
101 101
     {
102 102
         $response->header('Content-Type', 'application/csv');
103
-        $response->header('Content-Disposition', 'attachment; filename=' . $this->getFileName());
103
+        $response->header('Content-Disposition', 'attachment; filename='.$this->getFileName());
104 104
         $response->header('Pragma', 'no-cache');
105 105
     }
106 106
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
110 110
             $provider->getPaginationFactory()->setPageName('page_unused');
111 111
         } else {
112
-            Paginator::currentPageResolver(function () {
112
+            Paginator::currentPageResolver(function() {
113 113
                 return 1;
114 114
             });
115 115
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $file = fopen('php://output', 'w');
123 123
 
124 124
         header('Content-Type: text/csv');
125
-        header('Content-Disposition: attachment; filename="'. $this->getFileName() .'"');
125
+        header('Content-Disposition: attachment; filename="'.$this->getFileName().'"');
126 126
         header('Pragma: no-cache');
127 127
 
128 128
         set_time_limit(0);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             $output = [];
140 140
             foreach ($this->grid->getConfig()->getColumns() as $column) {
141 141
                 if (!$column->isHidden()) {
142
-                    $output[] = $this->escapeString( $column->getValue($row) );
142
+                    $output[] = $this->escapeString($column->getValue($row));
143 143
                 }
144 144
             }
145 145
             fputcsv($file, $output, static::CSV_DELIMITER);
Please login to merge, or discard this patch.
src/Components/ExcelExport.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public function initialize(Grid $grid)
66 66
     {
67 67
         parent::initialize($grid);
68
-        Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) {
68
+        Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) {
69 69
             if ($this->grid !== $grid) {
70 70
                 return;
71 71
             }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         if (version_compare(Application::VERSION, '5.0.0', '<')) {
158 158
             $provider->getPaginationFactory()->setPageName('page_unused');
159 159
         } else {
160
-            Paginator::currentPageResolver(function () {
160
+            Paginator::currentPageResolver(function() {
161 161
                 return 1;
162 162
             });
163 163
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     public function getOnFileCreate()
273 273
     {
274 274
         if ($this->on_file_create === null) {
275
-            $this->on_file_create = function (LaravelExcelWriter $excel) {
275
+            $this->on_file_create = function(LaravelExcelWriter $excel) {
276 276
                 $excel->sheet($this->getSheetName(), $this->getOnSheetCreate());
277 277
             };
278 278
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     public function getOnSheetCreate()
297 297
     {
298 298
         if ($this->on_sheet_create === null) {
299
-            $this->on_sheet_create = function (LaravelExcelWorksheet $sheet) {
299
+            $this->on_sheet_create = function(LaravelExcelWorksheet $sheet) {
300 300
                 $sheet->fromArray($this->getData(), null, 'A1', false, false);
301 301
             };
302 302
         }
Please login to merge, or discard this patch.
resources/views/default/components/filters/date_range_picker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /** @var Nayjest\Grids\Components\Filters\DateRangePicker $component */
3 3
 $id = uniqid();
4 4
 ?>
5
-<?php if($component->getLabel()): ?>
5
+<?php if ($component->getLabel()): ?>
6 6
     <span>
7 7
         <span class="glyphicon glyphicon-calendar"></span>
8 8
         <?= $component->getLabel() ?>
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             start.val(picker.startDate.format(options.format));
37 37
             var end = $('[name="<?= $component->getEndInputName() ?>"]');
38 38
             end.val(picker.endDate.format(options.format));
39
-            <?php if($component->isSubmittedOnChange()): ?>
39
+            <?php if ($component->isSubmittedOnChange()): ?>
40 40
             	end.get(0).form.submit();
41 41
             <?php endif ?>
42 42
         };
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 $('[name="<?= $component->getStartInputName() ?>"]').val('');
49 49
                 $('[name="<?= $component->getEndInputName() ?>"]').val('');
50 50
 
51
-                <?php if($component->isSubmittedOnChange()): ?>
51
+                <?php if ($component->isSubmittedOnChange()): ?>
52 52
                 var end = $('[name="<?= $component->getEndInputName() ?>"]');
53 53
                 end.get(0).form.submit();
54 54
                 <?php endif ?>
Please login to merge, or discard this patch.