Test Setup Failed
Push — a-simpler-manager ( 2ffb82...cdafdc )
by Ben
07:43
created
src/ManagedModels/Assistants/ManagedModelDefaults.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function adminLabel(string $key, $default = null, array $replace = [])
22 22
     {
23
-        if (! ($value = data_get($this->adminLabels(), $key)) ) {
23
+        if (!($value = data_get($this->adminLabels(), $key))) {
24 24
             return $default;
25 25
         }
26 26
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     private function adminLabels(): array
37 37
     {
38
-        $singular = Str::of(static::managedModelKey())->singular()->replace('_',' ')->__toString();
38
+        $singular = Str::of(static::managedModelKey())->singular()->replace('_', ' ')->__toString();
39 39
 
40 40
         return [
41 41
             /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
              */
46 46
             'label' => $singular, // Label used to refer to the generic model
47 47
             'nav_label' => $singular, // label used in the chief navigation
48
-            'page_title' => Str::of(static::managedModelKey())->plural()->replace('_',' ')->__toString(), // Generic collection title, for example used on index
48
+            'page_title' => Str::of(static::managedModelKey())->plural()->replace('_', ' ')->__toString(), // Generic collection title, for example used on index
49 49
 
50 50
             /**
51 51
              * Instance labels
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 
63 63
     private function onlineStatusAsLabel(): string
64 64
     {
65
-        if(!$this instanceof ProvidesUrl) return '';
65
+        if (!$this instanceof ProvidesUrl) return '';
66 66
 
67 67
         if ($this->current_status === PageState::PUBLISHED) {
68
-            return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>';
68
+            return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>';
69 69
         }
70 70
 
71 71
         if ($this->current_status === PageState::DRAFT) {
72
-            return '<a href="' . $this->url() . '" target="_blank" class="text-error"><em>offline</em></a>';
72
+            return '<a href="'.$this->url().'" target="_blank" class="text-error"><em>offline</em></a>';
73 73
         }
74 74
 
75 75
         if ($this->current_status === PageState::ARCHIVED) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@
 block discarded – undo
62 62
 
63 63
     private function onlineStatusAsLabel(): string
64 64
     {
65
-        if(!$this instanceof ProvidesUrl) return '';
65
+        if(!$this instanceof ProvidesUrl) {
66
+            return '';
67
+        }
66 68
 
67 69
         if ($this->current_status === PageState::PUBLISHED) {
68 70
             return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>';
Please login to merge, or discard this patch.