Passed
Push — master ( d7131d...d5b973 )
by Sergey
03:00
created
src/Controllers/ManagerController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function __construct(Request $request)
20 20
     {
21
-        if($request->get('locale')){
21
+        if ($request->get('locale')) {
22 22
             app()->setLocale($request->get('locale'));
23 23
             $this->locale = app()->getLocale();
24 24
         }
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
             $seoManager = SeoManagerModel::find($id);
84 84
             if (in_array($type, $allowedColumns)) {
85 85
                 $data = $request->get($type);
86
-                if($type != 'mapping' && $this->locale !== config('seo-manager.locale')){
86
+                if ($type != 'mapping' && $this->locale !== config('seo-manager.locale')) {
87 87
                     $translate = $seoManager->translation()->where('locale', $this->locale)->first();
88
-                    if(!$translate){
88
+                    if (!$translate) {
89 89
                         $newInst = new Translate();
90 90
                         $newInst->locale = $this->locale;
91 91
                         $translate = $seoManager->translation()->save($newInst);
92 92
                     }
93 93
                     $translate->$type = $data;
94 94
                     $translate->save();
95
-                }else{
95
+                } else {
96 96
                     $seoManager->$type = $data;
97 97
                     $seoManager->save();
98 98
                 }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $id = $request->get('id');
144 144
         $seoManager = SeoManagerModel::find($id);
145
-        if(is_null($seoManager)){
145
+        if (is_null($seoManager)) {
146 146
             return null;
147 147
         }
148 148
         $ogData = $this->getOgData($seoManager, null);
Please login to merge, or discard this patch.