Completed
Push — master ( c79919...bcbfd5 )
by Yaro
14:20
created
src/Handlers/QueryHandler.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -24,11 +24,17 @@
 block discarded – undo
24 24
         $this->definition = $controller->getDefinition();
25 25
     } // end __construct
26 26
 
27
+    /**
28
+     * @param string $ident
29
+     */
27 30
     protected function getDatabaseOption($ident)
28 31
     {
29 32
         return $this->definition->getDatabaseOption($ident);
30 33
     } // end getDatabaseOption
31 34
 
35
+    /**
36
+     * @param string $ident
37
+     */
32 38
     protected function hasDatabaseOption($ident)
33 39
     {
34 40
         return $this->definition->hasDatabaseOption($ident);
Please login to merge, or discard this patch.
misc/jarboe/definition/users/patterns/role_permissions.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
         <div class="row">
8 8
     @foreach ($info['rights'] as $id => $caption)
9 9
         <?php 
10
-        $type = $ident .'.'. $id;
10
+        $type = $ident.'.'.$id;
11 11
         $perm = array_key_exists($type, $groupPermissions) ? $groupPermissions[$type] : false;
12 12
         ?>
13 13
         <div class="col col-3">
Please login to merge, or discard this patch.
src/JarboeController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 use Yaro\Jarboe\Storage\File  as FileStorage;
16 16
 
17 17
 
18
-class JarboeController 
18
+class JarboeController
19 19
 {
20 20
 
21 21
     protected $options;
Please login to merge, or discard this patch.
src/Fields/ForeignField.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $type = $this->getAttribute('filter');
50 50
 
51
-        $input = View::make('admin::tb.filter.'. $type);
51
+        $input = View::make('admin::tb.filter.'.$type);
52 52
         $input->name = $this->getFieldName();
53 53
         $input->selected = $filter;
54 54
         // FIXME:
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
         if ($this->getAttribute('alias')) {
65 65
             $foreignTable = $this->getAttribute('alias');
66 66
         }
67
-        $foreignValueField = $foreignTable .'.'. $this->getAttribute('foreign_value_field');
67
+        $foreignValueField = $foreignTable.'.'.$this->getAttribute('foreign_value_field');
68 68
         
69 69
         // FIXME:
70 70
         if ($this->getAttribute('filter') == 'foreign') {
71
-            $foreignValueField = $foreignTable .'.'. $this->getAttribute('foreign_key_field');
72
-            $db->where($foreignValueField , $value);
71
+            $foreignValueField = $foreignTable.'.'.$this->getAttribute('foreign_key_field');
72
+            $db->where($foreignValueField, $value);
73 73
             return;
74 74
         }
75 75
 
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
             }
86 86
         }
87 87
 
88
-        $internalSelect = $this->definition->getDatabaseOption('table') .'.'. $this->getFieldName();
88
+        $internalSelect = $this->definition->getDatabaseOption('table').'.'.$this->getFieldName();
89 89
 
90 90
         $db->addSelect($internalSelect);
91 91
 
92 92
         $foreignTable = $this->getAttribute('foreign_table');
93 93
         $foreignTableName = $foreignTable;
94 94
         if ($this->getAttribute('alias')) {
95
-            $foreignTableName .= ' as '. $this->getAttribute('alias');
95
+            $foreignTableName .= ' as '.$this->getAttribute('alias');
96 96
             $foreignTable = $this->getAttribute('alias');
97 97
         }
98
-        $foreignKeyField = $foreignTable .'.'. $this->getAttribute('foreign_key_field');
98
+        $foreignKeyField = $foreignTable.'.'.$this->getAttribute('foreign_key_field');
99 99
 
100 100
         $join = $this->getAttribute('is_null') ? 'leftJoin' : 'join';
101 101
         $db->$join(
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         );
105 105
 
106 106
         if ($this->getAttribute('is_select_all')) {
107
-            $db->addSelect($foreignTable .'.*');
107
+            $db->addSelect($foreignTable.'.*');
108 108
         } else {
109
-            $fieldAlias = ' as '. $foreignTable.'_'.$this->getAttribute('foreign_value_field');
110
-            $db->addSelect($foreignTable .'.'. $this->getAttribute('foreign_value_field') . $fieldAlias);
109
+            $fieldAlias = ' as '.$foreignTable.'_'.$this->getAttribute('foreign_value_field');
110
+            $db->addSelect($foreignTable.'.'.$this->getAttribute('foreign_value_field').$fieldAlias);
111 111
         }
112 112
     } // end onSelectValue
113 113
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         if ($this->getAttribute('alias')) {
125 125
             $foreignTableName = $this->getAttribute('alias');
126 126
         }
127
-        $fieldName = $foreignTableName .'_'. $this->getAttribute('foreign_value_field');
127
+        $fieldName = $foreignTableName.'_'.$this->getAttribute('foreign_value_field');
128 128
 
129 129
         $value = isset($row->$fieldName) ? $row->$fieldName : '';
130 130
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
         $selectType = $this->getAttribute('select_type', 'simple');
153 153
         
154
-        $input = View::make('admin::tb.input.foreign_'. $selectType);
154
+        $input = View::make('admin::tb.input.foreign_'.$selectType);
155 155
         $input->selected = $this->getValue($row);
156 156
         $input->name     = $this->getFieldName();
157 157
         $input->options  = $this->getForeignKeyOptions();
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 use Jarboe;
9 9
 
10 10
 
11
-class ForeignField extends AbstractField 
11
+class ForeignField extends AbstractField
12 12
 {
13 13
 
14 14
     public function isEditable()
Please login to merge, or discard this patch.
src/Fields/ImageField.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $src = $image['sizes']['original'];
50 50
         $src = $this->getAttribute('cropp', true) ? cropp($src)->fit(50, 50)->src() : asset($src);
51 51
         // FIXME: move to template
52
-        $html = '<img height="50px" width="50px" src="'. $src .'" />';
52
+        $html = '<img height="50px" width="50px" src="'.$src.'" />';
53 53
               
54 54
         return $html;
55 55
     } // end getListSingle    
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
             $src = $isCropp ? cropp($src)->fit(50, 50)->src() : asset($src);
74 74
             
75 75
             $display = $i > $hideAfter ? 'none' : 'inline';
76
-            $html .= '<li style="display: '. $display .'; margin: 2px;">';
77
-            $html .= '<img height="'. $imgHeight .'" width="'. $imgWidth .'" src="'. $src .'" /></li>';
76
+            $html .= '<li style="display: '.$display.'; margin: 2px;">';
77
+            $html .= '<img height="'.$imgHeight.'" width="'.$imgWidth.'" src="'.$src.'" /></li>';
78 78
             
79 79
             $i++;
80 80
         }
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
     public function doUpload($file)
119 119
     {
120 120
         $extension = $file->guessExtension();
121
-        $rawFileName = md5_file($file->getRealPath()) .'_'. time();
122
-        $fileName = $rawFileName .'.'. $extension;
121
+        $rawFileName = md5_file($file->getRealPath()).'_'.time();
122
+        $fileName = $rawFileName.'.'.$extension;
123 123
         
124 124
         $definitionName = $this->definition->getOption('def_name');
125 125
         $destinationPath = 'storage/jarboe-temp/';
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $status = $file->move($destinationPath, $fileName);
128 128
         
129 129
         $data = array();
130
-        $data['sizes']['original'] = $destinationPath . $fileName;
130
+        $data['sizes']['original'] = $destinationPath.$fileName;
131 131
         
132 132
         $variations = $this->getAttribute('variations', array());
133 133
         foreach ($variations as $type => $methods) {
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
                 call_user_func_array(array($img, $method), $args);
137 137
             }
138 138
             
139
-            $path = $destinationPath . $rawFileName .'_'. $type .'.'. $extension;
139
+            $path = $destinationPath.$rawFileName.'_'.$type.'.'.$extension;
140 140
             $quality = $this->getAttribute('quality', 100);
141
-            $img->save(public_path() .'/'. $path, $quality);
141
+            $img->save(public_path().'/'.$path, $quality);
142 142
             $data['sizes'][$type] = $path;
143 143
         }
144 144
         
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
             'data'       => $data,
154 154
             'html'       => $html,
155 155
             'status'     => $status,
156
-            'link'       => asset($destinationPath . $fileName),
157
-            'short_link' => $destinationPath . $fileName,
156
+            'link'       => asset($destinationPath.$fileName),
157
+            'short_link' => $destinationPath.$fileName,
158 158
             // FIXME: naughty hack
159 159
             'delimiter' => ','
160 160
         );
@@ -196,11 +196,11 @@  discard block
 block discarded – undo
196 196
             $images = [$images];
197 197
         }
198 198
         
199
-        $prefixPath = 'storage/'. preg_replace('~\\\~', '_', $this->definition->getName()) .'/';
199
+        $prefixPath = 'storage/'.preg_replace('~\\\~', '_', $this->definition->getName()).'/';
200 200
         foreach ($images as &$image) {
201 201
             foreach ($image['sizes'] as &$path) {
202 202
                 if (preg_match('~storage/jarboe-temp/~', $path)) {
203
-                    $newPath = $prefixPath . get_path_by_id($id);
203
+                    $newPath = $prefixPath.get_path_by_id($id);
204 204
                     
205 205
                     if (!is_dir(public_path($newPath))) {
206 206
                         mkdir(public_path($newPath), 0766, true); 
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
209 209
                     $pathSegments = explode('/', $path);
210 210
                     $fileName = end($pathSegments);
211 211
                     
212
-                    rename(public_path($path), public_path($newPath . $fileName));
212
+                    rename(public_path($path), public_path($newPath.$fileName));
213 213
                     
214
-                    $path = $newPath . $fileName;
214
+                    $path = $newPath.$fileName;
215 215
                 }
216 216
             }
217 217
         }
Please login to merge, or discard this patch.
src/Fields/IntField.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Illuminate\Support\Facades\View;
6 6
 
7 7
 
8
-class IntField extends TextField 
8
+class IntField extends TextField
9 9
 {
10 10
 
11 11
     public function isEditable()
Please login to merge, or discard this patch.
src/Handlers/RequestHandler.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Yaro\Jarboe\JarboeController;
6 6
 
7
-class RequestHandler 
7
+class RequestHandler
8 8
 {
9 9
 
10 10
     protected $controller;
Please login to merge, or discard this patch.