Passed
Push — develop ( c34649...e21e8a )
by Andrew
07:29 queued 02:39
created
src/Recipe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         Event::on(
55 55
             Fields::class,
56 56
             Fields::EVENT_REGISTER_FIELD_TYPES,
57
-            function (RegisterComponentTypesEvent $event) {
57
+            function(RegisterComponentTypesEvent $event) {
58 58
                 $event->types[] = RecipeField::class;
59 59
             }
60 60
         );
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         Event::on(
64 64
             Plugins::class,
65 65
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
66
-            function (PluginEvent $event) {
66
+            function(PluginEvent $event) {
67 67
                 if (!Craft::$app->getRequest()->getIsConsoleRequest()
68 68
                 && ($event->plugin === $this)) {
69 69
                     Craft::$app->getResponse()->redirect(UrlHelper::cpUrl('recipe/welcome'))->send();
Please login to merge, or discard this patch.
src/models/Recipe.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 $review = [
252 252
                     'type' => 'Review',
253 253
                     'author' => $rating['author'],
254
-                    'name' => $this->name . ' ' . Craft::t('recipe', 'Review'),
254
+                    'name' => $this->name.' '.Craft::t('recipe', 'Review'),
255 255
                     'description' => $rating['review'],
256 256
                     'reviewRating' => [
257 257
                         'type' => 'Rating',
@@ -267,13 +267,13 @@  discard block
 block discarded – undo
267 267
         }
268 268
 
269 269
         if ($this->prepTime) {
270
-            $recipeJSONLD['prepTime'] = 'PT' . $this->prepTime . 'M';
270
+            $recipeJSONLD['prepTime'] = 'PT'.$this->prepTime.'M';
271 271
         }
272 272
         if ($this->cookTime) {
273
-            $recipeJSONLD['cookTime'] = 'PT' . $this->cookTime . 'M';
273
+            $recipeJSONLD['cookTime'] = 'PT'.$this->cookTime.'M';
274 274
         }
275 275
         if ($this->totalTime) {
276
-            $recipeJSONLD['totalTime'] = 'PT' . $this->totalTime . 'M';
276
+            $recipeJSONLD['totalTime'] = 'PT'.$this->totalTime.'M';
277 277
         }
278 278
 
279 279
         return $this->renderJsonLd($recipeJSONLD, $raw);
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
                             $units = rtrim($units);
412 412
                             $units = rtrim($units, 's');
413 413
                         }
414
-                        $ingredient .= ' ' . $units;
414
+                        $ingredient .= ' '.$units;
415 415
                     }
416 416
                 }
417 417
                 if ($row['ingredient']) {
418
-                    $ingredient .= ' ' . $row['ingredient'];
418
+                    $ingredient .= ' '.$row['ingredient'];
419 419
                 }
420 420
                 if ($raw) {
421 421
                     $ingredient = Template::raw($ingredient);
Please login to merge, or discard this patch.
src/helpers/PluginTemplate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             }
69 69
             // Render the template with our vars passed in
70 70
             try {
71
-                $htmlText = Craft::$app->view->renderTemplate('recipe/' .$templatePath, $params);
71
+                $htmlText = Craft::$app->view->renderTemplate('recipe/'.$templatePath, $params);
72 72
                 $templateRendered = true;
73 73
             } catch (\Exception $e) {
74 74
                 $templateRendered = false;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             }
84 84
             // Render the template with our vars passed in
85 85
             try {
86
-                $htmlText = Craft::$app->view->renderTemplate('recipe/' . $templatePath, $params);
86
+                $htmlText = Craft::$app->view->renderTemplate('recipe/'.$templatePath, $params);
87 87
                 $templateRendered = true;
88 88
             } catch (\Exception $e) {
89 89
                 $templateRendered = false;
Please login to merge, or discard this patch.
src/services/NutritionApi.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
                 'transFatContent' => round($result->totalNutrients->FATRN->quantity / $yield, 1),
70 70
                 'unsaturatedFatContent' => round(($result->totalNutrients->FAMS->quantity + $result->totalNutrients->FAPU->quantity) / $yield, 1),
71 71
             ];
72
-        }
73
-        catch (Exception $exception) {
72
+        } catch (Exception $exception) {
74 73
             $message = 'Error fetching nutritional information from API. ';
75 74
 
76 75
             switch ($exception->getCode()) {
Please login to merge, or discard this patch.
src/console/controllers/NutritionApiController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,8 +114,7 @@
 block discarded – undo
114 114
                 if (!Craft::$app->getElements()->saveElement($entry)) {
115 115
                     $failed++;
116 116
                 }
117
-            }
118
-            else {
117
+            } else {
119 118
                 $failed++;
120 119
             }
121 120
 
Please login to merge, or discard this patch.