Passed
Pull Request — develop (#65)
by Ben
04:13
created
src/services/NutritionApi.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $yield = $result->yield ?: 1;
57 57
 
58 58
             return [
59
-                'servingSize' => round($result->totalWeight ?? 0 / $yield, 0) . ' grams',
59
+                'servingSize' => round($result->totalWeight ?? 0 / $yield, 0).' grams',
60 60
                 'calories' => round($result->totalNutrients->ENERC_KCAL->quantity ?? 0 / $yield, 0),
61 61
                 'carbohydrateContent' => round($result->totalNutrients->CHOCDF->quantity ?? 0 / $yield, 1),
62 62
                 'cholesterolContent' => round($result->totalNutrients->CHOLE->quantity ?? 0 / $yield, 1),
Please login to merge, or discard this 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 ?? 0 / $yield, 1),
70 70
                 'unsaturatedFatContent' => round(($result->totalNutrients->FAMS->quantity ?? 0 + $result->totalNutrients->FAPU->quantity ?? 0) / $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.