Completed
Push — master ( 22caaa...988d36 )
by Maxime
15:13 queued 03:59
created
src/Distilleries/Expendable/Datatables/BaseDatatable.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php namespace Distilleries\Expendable\Datatables;
2 2
 
3
-use Distilleries\DatatableBuilder\EloquentDatatable;
4
-use Distilleries\Expendable\Models\Language;
3
+use Distilleries\DatatableBuilder\EloquentDatatable;
4
+use Distilleries\Expendable\Models\Language;
5 5
 use Distilleries\Expendable\Models\Translation;
6 6
 
7 7
 abstract class BaseDatatable extends EloquentDatatable {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
     // ------------------------------------------------------------------------------------------------
11 11
     public function addTranslationAction($template = 'expendable::admin.form.components.datatable.translations', $route = '')
12 12
     {
13
-        $this->add('translation', function ($model) use ($template, $route) {
13
+        $this->add('translation', function($model) use ($template, $route) {
14 14
 
15 15
             $languages    = Language::withoutCurrentLanguage()->get();
16
-            $translations = Translation::byElement($model)->lists('id_element','iso')->toArray();
16
+            $translations = Translation::byElement($model)->lists('id_element', 'iso')->toArray();
17 17
             return view($template, array(
18 18
                 'languages'    => $languages,
19 19
                 'translations' => $translations,
Please login to merge, or discard this patch.
Distilleries/Expendable/Http/Controllers/Admin/Base/ModelBaseController.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -96,6 +96,10 @@
 block discarded – undo
96 96
         ];
97 97
     }
98 98
 
99
+    /**
100
+     * @param string $key
101
+     * @param null|integer $default_value
102
+     */
99 103
     protected function getParams(Request $request, $key, $default_value)
100 104
     {
101 105
         $element = $request->get($key);
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/VerifyCsrfToken.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 block discarded – undo
5 5
 
6 6
 class VerifyCsrfToken extends BaseVerifier {
7 7
 
8
-	/**
9
-	 * Handle an incoming request.
10
-	 *
11
-	 * @param  \Illuminate\Http\Request  $request
12
-	 * @param  \Closure  $next
13
-	 * @return mixed
14
-	 */
15
-	public function handle($request, Closure $next)
16
-	{
17
-		return parent::handle($request, $next);
18
-	}
8
+    /**
9
+     * Handle an incoming request.
10
+     *
11
+     * @param  \Illuminate\Http\Request  $request
12
+     * @param  \Closure  $next
13
+     * @return mixed
14
+     */
15
+    public function handle($request, Closure $next)
16
+    {
17
+        return parent::handle($request, $next);
18
+    }
19 19
 
20 20
 }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Models/Translation.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function scopeByElement($query, Model $model)
55 55
     {
56 56
         return $query->where($this->getTable() . '.' . $this->getModelColumn(), '=', $model->getTable())
57
-                     ->where($this->getTable() . '.' . $this->getIdSourceColumn(), '=', $model->getKey());
57
+                        ->where($this->getTable() . '.' . $this->getIdSourceColumn(), '=', $model->getKey());
58 58
     }
59 59
 
60 60
 }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Models/Language.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
 
15 15
     public function scopeWithoutCurrentLanguage($query)
16 16
     {
17
-        return $query->where($this->getTable().'.iso','<>',app()->getLocale());
17
+        return $query->where($this->getTable() . '.iso', '<>', app()->getLocale());
18 18
     }
19 19
 
20 20
     public function scopeWithTranslationElement($query)
21 21
     {
22
-        return $query->where($this->getTable().'.iso','<>',app()->getLocale());
22
+        return $query->where($this->getTable() . '.iso', '<>', app()->getLocale());
23 23
     }
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Scopes/TranslatableScope.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $iso = app()->getLocale();
43 43
         }
44 44
 
45
-        $builder->whereExists(function ($query) use ($model, $iso) {
45
+        $builder->whereExists(function($query) use ($model, $iso) {
46 46
             $query->select(\DB::raw(1))
47 47
                 ->from($model->getQualifiedTable())
48 48
                 ->whereRaw($model->getTable() . '.' . $model->getKeyName() . ' = ' . $model->getQualifiedIdElementColumn())
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         unset($query->wheres[$this->where_index]);
72 72
         $where_bindings = $query->getRawBindings()['where'];
73 73
         unset($where_bindings[$this->binding_index]);
74
-        unset($where_bindings[$this->binding_index-1]);
74
+        unset($where_bindings[$this->binding_index - 1]);
75 75
         $query->setBindings(array_values($where_bindings));
76 76
         $query->wheres = array_values($query->wheres);
77 77
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected function addWithoutTranslation(Builder $builder)
103 103
     {
104
-        $builder->macro('withoutTranslation', function (Builder $builder) {
104
+        $builder->macro('withoutTranslation', function(Builder $builder) {
105 105
             $this->remove($builder, $builder->getModel());
106 106
 
107 107
             return $builder;
Please login to merge, or discard this patch.
src/Distilleries/Expendable/ExpendableServiceProvider.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Distilleries\Expendable\Exporter\CsvExporter;
4 4
 use Distilleries\Expendable\Exporter\ExcelExporter;
5
-use Distilleries\Expendable\Exporter\PdfExporter;
6 5
 use Distilleries\Expendable\Importer\CsvImporter;
7 6
 use Distilleries\Expendable\Importer\XlsImporter;
8 7
 use Distilleries\Expendable\Layouts\LayoutManager;
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Listeners/UserListener.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Distilleries\Expendable\Contracts\LockableContract;
4 4
 use Distilleries\Expendable\Helpers\UserUtils;
5
-use Distilleries\Expendable\Models\User;
6 5
 
7 6
 class UserListener extends BaseListener
8 7
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
 
37 37
 
38
-        if($model->email != ''){
38
+        if ($model->email != '') {
39 39
             $model->unlock();
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
 
56
-    public function postUnLock(Request $request){
56
+    public function postUnLock(Request $request) {
57 57
 
58 58
         $model = $this->model->findOrFail($request->get('id'));
59 59
         $model->nb_of_try = 0;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     }
64 64
 
65 65
 
66
-    public function postLock(Request $request){
66
+    public function postLock(Request $request) {
67 67
 
68 68
         $model = $this->model->findOrFail($request->get('id'));
69 69
         $model->nb_of_try = config('expendable.auth.nb_of_try');
Please login to merge, or discard this patch.