Completed
Push — ft/package ( 7b41d6...ceb161 )
by Philippe
13:50
created
app/Exceptions/Handler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     public function render($request, Exception $exception)
53 53
     {
54
-        if($exception instanceof AuthorizationException){
54
+        if ($exception instanceof AuthorizationException) {
55 55
             return $this->unauthorized($request, $exception);
56 56
         }
57 57
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     protected function unauthorized($request, AuthorizationException $exception)
62 62
     {
63 63
         return redirect()->route('chief.back.dashboard')
64
-                         ->with('messages.error', 'Oeps. Het lijkt erop dat je geen toegang hebt tot dit deel van chief. Vraag even de beheerder voor meer info.');
64
+                            ->with('messages.error', 'Oeps. Het lijkt erop dat je geen toegang hebt tot dit deel van chief. Vraag even de beheerder voor meer info.');
65 65
 
66 66
     }
67 67
 
Please login to merge, or discard this patch.
app/Http/Requests/PageUpdateRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     {
27 27
 
28 28
         return [
29
-            'trans.*.title'     => 'required|unique:page_translations,title,'. $this->id . ',page_id|max:200',
30
-            'trans.*.slug'      => 'required|unique:page_translations,slug,' . $this->id . ',page_id|distinct',
29
+            'trans.*.title'     => 'required|unique:page_translations,title,'.$this->id.',page_id|max:200',
30
+            'trans.*.slug'      => 'required|unique:page_translations,slug,'.$this->id.',page_id|distinct',
31 31
             'trans.*.content'   => 'required|max:1500',
32 32
             'trans.*.short'     => 'max:700',
33 33
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/TranslationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function index()
11 11
     {
12 12
         $pages = Page::sequence()->get();
13
-        $pages->each(function($page){
13
+        $pages->each(function($page) {
14 14
             $page->groupedlines = $this->groupLinesByKey($page);
15 15
         });
16 16
         return view('squanto::index', compact('pages'));
Please login to merge, or discard this patch.
app/Http/Middleware/PermissionMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             return redirect('/');
21 21
         }
22 22
 
23
-        if (! $request->user()->can($permission)) {
23
+        if (!$request->user()->can($permission)) {
24 24
             abort(403);
25 25
         }
26 26
 
Please login to merge, or discard this patch.
app/Http/Middleware/AuthenticateSuperadmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         if (!$this->auth->user() || !$this->auth->user()->isSuperAdmin()) {
40 40
             if ($request->ajax()) {
41 41
                 return response('Unauthorized.', 401);
42
-            } else {
42
+            }else {
43 43
                 return redirect()->guest('admin/login');
44 44
             }
45 45
         }
Please login to merge, or discard this patch.
app/Http/Middleware/RoleMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
             return redirect('/');
21 21
         }
22 22
 
23
-        if (! $request->user()->hasRole($role)) {
23
+        if (!$request->user()->hasRole($role)) {
24 24
             abort(403);
25 25
         }
26 26
 
27
-        if (! $request->user()->can($permission)) {
27
+        if (!$request->user()->can($permission)) {
28 28
             abort(403);
29 29
         }
30 30
 
Please login to merge, or discard this patch.
app/Http/Middleware/OptimizeImages.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@
 block discarded – undo
12 12
     {
13 13
         $optimizerChain = app(OptimizerChain::class);
14 14
 
15
-        collect($request->allFiles())->each(function ($file) use ($optimizerChain) {
16
-            if(is_array($file)){
17
-                collect($file)->each(function ($media)  use ($optimizerChain) {
15
+        collect($request->allFiles())->each(function($file) use ($optimizerChain) {
16
+            if (is_array($file)) {
17
+                collect($file)->each(function($media)  use ($optimizerChain) {
18 18
                     $optimizerChain->optimize($media->getPathname());
19 19
                 });
20
-            }else{
20
+            }else {
21 21
                 $optimizerChain->optimize($file->getPathname());
22 22
             }
23 23
         });
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
                 collect($file)->each(function ($media)  use ($optimizerChain) {
18 18
                     $optimizerChain->optimize($media->getPathname());
19 19
                 });
20
-            }else{
20
+            } else{
21 21
                 $optimizerChain->optimize($file->getPathname());
22 22
             }
23 23
         });
Please login to merge, or discard this patch.
app/Http/Middleware/HoneyPot.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
      */
34 34
     private function honeypot(Request $request)
35 35
     {
36
-        if(!$request->exists('your_name') or $request->has('your_name'))
36
+        if (!$request->exists('your_name') or $request->has('your_name'))
37 37
         {
38
-            abort('403','Request blocked due to assumed spam attempt. Honeypot field was filled in.');
38
+            abort('403', 'Request blocked due to assumed spam attempt. Honeypot field was filled in.');
39 39
         }
40 40
     }
41 41
 
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function timer(Request $request)
51 51
     {
52
-        if(!$request->exists('_timer') or (time()-2) <= $request->get('_timer'))
52
+        if (!$request->exists('_timer') or (time()-2) <= $request->get('_timer'))
53 53
         {
54
-            abort('403','Request blocked due to assumed spam attempt. Submission happened too fast.');
54
+            abort('403', 'Request blocked due to assumed spam attempt. Submission happened too fast.');
55 55
         }
56 56
     }
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
src/helpers.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Retrieve the logged in admin
5 5
  */
6
-if(!function_exists('admin')){
7
-    function admin(){
6
+if (!function_exists('admin')) {
7
+    function admin() {
8 8
         return \Illuminate\Support\Facades\Auth::guard('chief')->user();
9 9
     }
10 10
 }
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 /**
13 13
  * Form fields for honeypot protection on form submissions
14 14
  */
15
-if(!function_exists('honeypot_fields')){
16
-    function honeypot_fields(){
15
+if (!function_exists('honeypot_fields')) {
16
+    function honeypot_fields() {
17 17
         return '<div style="display:none;"><input type="text" name="your_name"/><input type="hidden" name="_timer" value="'.time().'" /></div>';
18 18
     }
19 19
 }
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
  * Retrieve the public asset with a version stamp.
24 24
  * This allows for browsercache out of the box
25 25
  */
26
-if(!function_exists('cached_asset'))
26
+if (!function_exists('cached_asset'))
27 27
 {
28 28
     function cached_asset($filepath, $type = null)
29 29
     {
30 30
         $manifestPath = $type == 'back' ? '/chief-assets/back' : '/assets';
31 31
 
32 32
         // Manifest expects each entry to start with a leading slash - we make sure to deduplicate the manifest path.
33
-        $entry = str_replace($manifestPath,'', '/'.ltrim($filepath,'/') );
33
+        $entry = str_replace($manifestPath, '', '/'.ltrim($filepath, '/'));
34 34
 
35
-        try{
35
+        try {
36 36
 
37 37
             // Paths should be given relative to the manifestpath so make sure to remove the basepath
38
-            return asset( mix($entry.'/test', $manifestPath) );
38
+            return asset(mix($entry.'/test', $manifestPath));
39 39
         }
40
-        catch(\Exception $e)
40
+        catch (\Exception $e)
41 41
         {
42 42
             \Illuminate\Support\Facades\Log::error($e);
43 43
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
 
37 37
             // Paths should be given relative to the manifestpath so make sure to remove the basepath
38 38
             return asset( mix($entry.'/test', $manifestPath) );
39
-        }
40
-        catch(\Exception $e)
39
+        } catch(\Exception $e)
41 40
         {
42 41
             \Illuminate\Support\Facades\Log::error($e);
43 42
 
Please login to merge, or discard this patch.