Test Failed
Push — ft/fields-refactor ( 9f047d...e6f9ef )
by Ben
315:03 queued 288:46
created
src/Common/Helpers/Memoize.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
 
36 36
     private function convertToCachableParameters(array $parameters)
37 37
     {
38
-        foreach($parameters as $key => $value) {
39
-            if($value instanceof Model) $parameters[$key] = get_class($value) . '@' . $value->id;
38
+        foreach ($parameters as $key => $value) {
39
+            if ($value instanceof Model) $parameters[$key] = get_class($value).'@'.$value->id;
40 40
         }
41 41
 
42 42
         return $parameters;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@
 block discarded – undo
36 36
     private function convertToCachableParameters(array $parameters)
37 37
     {
38 38
         foreach($parameters as $key => $value) {
39
-            if($value instanceof Model) $parameters[$key] = get_class($value) . '@' . $value->id;
39
+            if($value instanceof Model) {
40
+                $parameters[$key] = get_class($value) . '@' . $value->id;
41
+            }
40 42
         }
41 43
 
42 44
         return $parameters;
Please login to merge, or discard this patch.
src/Urls/UrlRecord.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
             $builder->where('locale', $locale);
116 116
         }
117 117
 
118
-        if (! $includeRedirects) {
118
+        if (!$includeRedirects) {
119 119
             $builder->whereNull('redirect_id');
120 120
         }
121 121
 
122 122
         if ($ignoredModel) {
123
-            $builder->whereNotIn('id', function ($query) use ($ignoredModel) {
123
+            $builder->whereNotIn('id', function($query) use ($ignoredModel) {
124 124
                 $query->select('id')
125 125
                       ->from('chief_urls')
126 126
                       ->where('model_type', '=', $ignoredModel->getMorphClass())
@@ -133,16 +133,16 @@  discard block
 block discarded – undo
133 133
 
134 134
     public static function allOnlineModels(): array
135 135
     {
136
-        return chiefMemoize('all-online-models', function () {
136
+        return chiefMemoize('all-online-models', function() {
137 137
 
138 138
             $liveUrlRecords = static::whereNull('redirect_id')->select('model_type', 'model_id')->groupBy('model_type', 'model_id')->get()->mapToGroups(function($record) {
139 139
                 return [$record->model_type => $record->model_id];
140 140
             });
141 141
 
142 142
             // Get model for each of these records...
143
-            $models = $liveUrlRecords->map(function($record, $key){
143
+            $models = $liveUrlRecords->map(function($record, $key) {
144 144
                 return Morphables::instance($key)->find($record->toArray());
145
-            })->each->reject(function ($model) {
145
+            })->each->reject(function($model) {
146 146
                 // Invalid references to archived or removed models where url record still exists.
147 147
                 return is_null($model);
148 148
             })->flatten();
Please login to merge, or discard this patch.
src/Settings/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $this->fetch();
18 18
 
19
-        if (! isset($this->items[$key])) {
19
+        if (!isset($this->items[$key])) {
20 20
             return $default;
21 21
         }
22 22
         
Please login to merge, or discard this patch.
src/Settings/SettingFieldsManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
     public function saveFields(Request $request)
52 52
     {
53 53
         ddd($request->all());
54
-        foreach($this->fields() as $key => $field)
54
+        foreach ($this->fields() as $key => $field)
55 55
         {
56
-            if(!$setting = Setting::where('key', $key)->first()) {
56
+            if (!$setting = Setting::where('key', $key)->first()) {
57 57
                 Setting::create([
58 58
                     'key' => $key,
59 59
                     'value' => $request->get($key, ''),
Please login to merge, or discard this patch.