Passed
Pull Request — master (#538)
by
unknown
05:00
created
src/Repositories/Behaviors/HandleBrowsers.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,11 +142,11 @@
 block discarded – undo
142 142
     }
143 143
 
144 144
         /**
145
-     * Get all browser' detail info from the $browsers attribute. 
146
-     * The missing information will be inferred by convention of Twill.
147
-     *
148
-     * @return Illuminate\Support\Collection
149
-     */
145
+         * Get all browser' detail info from the $browsers attribute. 
146
+         * The missing information will be inferred by convention of Twill.
147
+         *
148
+         * @return Illuminate\Support\Collection
149
+         */
150 150
     protected function getBrowsers()
151 151
     {
152 152
         return collect($this->browsers)->map(function ($browser, $key) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function getFormFieldsForBrowser($object, $relation, $routePrefix = null, $titleKey = 'title', $moduleName = null)
109 109
     {
110
-        return $object->$relation->map(function ($relatedElement) use ($titleKey, $routePrefix, $relation, $moduleName) {
110
+        return $object->$relation->map(function($relatedElement) use ($titleKey, $routePrefix, $relation, $moduleName) {
111 111
             return [
112 112
                 'id' => $relatedElement->id,
113 113
                 'name' => $relatedElement->titleInBrowser ?? $relatedElement->$titleKey,
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function getFormFieldsForRelatedBrowser($object, $relation)
128 128
     {
129
-        return $object->getRelated($relation)->map(function ($relatedElement) {
129
+        return $object->getRelated($relation)->map(function($relatedElement) {
130 130
             return ($relatedElement != null) ? [
131 131
                 'id' => $relatedElement->id,
132 132
                 'name' => $relatedElement->titleInBrowser ?? $relatedElement->title,
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             ]) + (classHasTrait($relatedElement, HasMedias::class) ? [
137 137
                 'thumbnail' => $relatedElement->defaultCmsImage(['w' => 100, 'h' => 100]),
138 138
             ] : []) : [];
139
-        })->reject(function ($item) {
139
+        })->reject(function($item) {
140 140
             return empty($item);
141 141
         })->values()->toArray();
142 142
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     protected function getBrowsers()
151 151
     {
152
-        return collect($this->browsers)->map(function ($browser, $key) {
152
+        return collect($this->browsers)->map(function($browser, $key) {
153 153
             $browserName = is_string($browser) ? $browser : $key;
154 154
             return [
155 155
                 'relation' => !empty($browser['relation']) ? $browser['relation'] : $this->inferRelationFromBrowserName($browserName),
Please login to merge, or discard this patch.