Completed
Push — ft/package ( 7b41d6...ceb161 )
by Philippe
13:50
created
src/Common/Traits/Featurable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public function scopeFeatured($query)
13 13
     {
14
-        $query->where('featured',1);
14
+        $query->where('featured', 1);
15 15
     }
16 16
 
17 17
     public function feature()
Please login to merge, or discard this patch.
src/Common/Traits/CheckPreviewTrait.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 {
10 10
     public function isPreviewAllowed()
11 11
     {
12
-        if(request()->has('preview-mode') && Auth::guard('chief')->check())
12
+        if (request()->has('preview-mode') && Auth::guard('chief')->check())
13 13
         {
14 14
             Session::now('note.default', 'U bekijkt een preview.');
15 15
             return true;
16
-        }else{
16
+        }else {
17 17
             return false;
18 18
         }
19 19
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         {
14 14
             Session::now('note.default', 'U bekijkt een preview.');
15 15
             return true;
16
-        }else{
16
+        } else{
17 17
             return false;
18 18
         }
19 19
     }
Please login to merge, or discard this patch.
src/Common/Relations/ActingAsParent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public function children(): Collection
12 12
     {
13
-        if($this->areChildRelationsLoaded()){
13
+        if ($this->areChildRelationsLoaded()) {
14 14
             return $this->loadedChildRelations;
15 15
         }
16 16
         return $this->loadedChildRelations = Relation::children($this->getMorphClass(), $this->getKey());
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function presentChildren(): \Illuminate\Support\Collection
36 36
     {
37
-        return $this->children()->map(function($child){
37
+        return $this->children()->map(function($child) {
38 38
             return $child->presentForParent($this, $child->relation);
39 39
         });
40 40
     }
Please login to merge, or discard this patch.
src/Common/Relations/Relation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
             ->orderBy('sort', 'ASC')
18 18
             ->get();
19 19
 
20
-        return $relations->map(function ($relation) {
20
+        return $relations->map(function($relation) {
21 21
             $parent = (new $relation->parent_type)->find($relation->parent_id);
22 22
             $parent->relation = $relation;
23 23
             return $parent;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             ->orderBy('sort', 'ASC')
32 32
             ->get();
33 33
 
34
-        return $relations->map(function ($relation) {
34
+        return $relations->map(function($relation) {
35 35
             $child = (new $relation->child_type)->find($relation->child_id);
36 36
             $child->relation = $relation;
37 37
             return $child;
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
         return [
50 50
             [
51 51
                 'label' => 'Pagina\'s',
52
-                'values' => Page::all()->map(function($page){
53
-                    return ['composite_id' => $page->getMorphClass().'@'.$page->id, 'label' => 'Pagina ' . teaser($page->title, 20, '...')];
52
+                'values' => Page::all()->map(function($page) {
53
+                    return ['composite_id' => $page->getMorphClass().'@'.$page->id, 'label' => 'Pagina '.teaser($page->title, 20, '...')];
54 54
                 })->toArray(),
55 55
             ]
56 56
         ];
Please login to merge, or discard this patch.
src/Common/Relations/ActingAsChild.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public function parents(): Collection
12 12
     {
13
-        if($this->areParentRelationsLoaded()){
13
+        if ($this->areParentRelationsLoaded()) {
14 14
             return $this->loadedParentRelations;
15 15
         }
16 16
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             'parent_id'    => $parent_id,
51 51
             'child_type' => $this->getMorphClass(),
52 52
             'child_id'   => $this->getKey(),
53
-        ],$attributes);
53
+        ], $attributes);
54 54
     }
55 55
 
56 56
     private function detachParent($parent_type, $parent_id)
Please login to merge, or discard this patch.
src/Common/Relations/RelatedCollection.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
         $collection = new static();
14 14
 
15
-        foreach($available_children_types as $type) {
15
+        foreach ($available_children_types as $type) {
16 16
             $collection = $collection->merge((new $type)->all());
17 17
         }
18 18
 
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
     
22 22
     public static function relationIds(Collection $collection): Collection
23 23
     {
24
-        return $collection->map(function($entry){
24
+        return $collection->map(function($entry) {
25 25
             return $entry->getRelationId();
26 26
         });    
27 27
     }
28 28
 
29 29
     public function flattenForSelect()
30 30
     {
31
-        return $this->map(function(ActsAsChild $child){
31
+        return $this->map(function(ActsAsChild $child) {
32 32
             return [
33 33
                 'id'    => $child->getRelationId(),
34 34
                 'label' => $child->getRelationLabel(),
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
         $grouped = [];
43 43
 
44 44
         $this->flattenForSelect()->each(function($entry) use(&$grouped){
45
-            if(isset($grouped[$entry['group']])){
45
+            if (isset($grouped[$entry['group']])) {
46 46
                 $grouped[$entry['group']]['values'][] = $entry;
47
-            } else{
47
+            }else {
48 48
                 $grouped[$entry['group']] = ['group' => $entry['group'], 'values' => [$entry]];
49 49
             }
50 50
         });
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 
56 56
     public static function inflate(array $relateds = []): self
57 57
     {
58
-        if(count($relateds) == 1 && is_null(reset($relateds))) $relateds = [];
58
+        if (count($relateds) == 1 && is_null(reset($relateds))) $relateds = [];
59 59
 
60
-        return (new static($relateds))->map(function($related){
60
+        return (new static($relateds))->map(function($related) {
61 61
 
62
-            list($type,$id) = explode('@', $related);
62
+            list($type, $id) = explode('@', $related);
63 63
             return (new $type)->find($id);
64 64
 
65 65
         });
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@
 block discarded – undo
55 55
 
56 56
     public static function inflate(array $relateds = []): self
57 57
     {
58
-        if(count($relateds) == 1 && is_null(reset($relateds))) $relateds = [];
58
+        if(count($relateds) == 1 && is_null(reset($relateds))) {
59
+            $relateds = [];
60
+        }
59 61
 
60 62
         return (new static($relateds))->map(function($related){
61 63
 
Please login to merge, or discard this patch.
src/Common/UniqueSlug.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $slug = $originalslug = Str::slug($title);
28 28
         $i = 1;
29 29
 
30
-        while(!$this->isSlugUnique($slug,$entity))
30
+        while (!$this->isSlugUnique($slug, $entity))
31 31
         {
32 32
             $slug = $originalslug.'-'.$i;
33 33
             $i++;
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
      * @param SluggableContract $entity
43 43
      * @return bool
44 44
      */
45
-    private function isSlugUnique($slug,SluggableContract $entity = null)
45
+    private function isSlugUnique($slug, SluggableContract $entity = null)
46 46
     {
47 47
         $model = $this->model->findBySlug($slug);
48 48
 
49
-        if(!$model || ($entity && $entity->id && $model->id == $entity->id)) return true;
49
+        if (!$model || ($entity && $entity->id && $model->id == $entity->id)) return true;
50 50
 
51 51
         return false;
52 52
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
     {
47 47
         $model = $this->model->findBySlug($slug);
48 48
 
49
-        if(!$model || ($entity && $entity->id && $model->id == $entity->id)) return true;
49
+        if(!$model || ($entity && $entity->id && $model->id == $entity->id)) {
50
+            return true;
51
+        }
50 52
 
51 53
         return false;
52 54
     }
Please login to merge, or discard this patch.
resources/views/spirit/settings/typography.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php include(__DIR__ . '/../_partials/header.php'); ?>
1
+<?php include(__DIR__.'/../_partials/header.php'); ?>
2 2
 
3 3
 <section class="column stack-l typography" id="typography">
4 4
     <h1>Typography</h1>
@@ -62,4 +62,4 @@  discard block
 block discarded – undo
62 62
 
63 63
 </section>
64 64
 
65
-<?php include(__DIR__ . '/../_partials/footer.php'); ?>
65
+<?php include(__DIR__.'/../_partials/footer.php'); ?>
Please login to merge, or discard this patch.
resources/views/spirit/settings/colors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php include(__DIR__ . '/../_partials/header.php'); ?>
1
+<?php include(__DIR__.'/../_partials/header.php'); ?>
2 2
 
3 3
     <section class="column stack-l color-scheme" id="colorscheme">
4 4
         <h1>Color Scheme</h1>
@@ -205,4 +205,4 @@  discard block
 block discarded – undo
205 205
         </div>
206 206
     </section>
207 207
 
208
-<?php include(__DIR__ . '/../_partials/footer.php'); ?>
209 208
\ No newline at end of file
209
+<?php include(__DIR__.'/../_partials/footer.php'); ?>
210 210
\ No newline at end of file
Please login to merge, or discard this patch.