AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
59%
Quality Avg
?
64%
Security Avg
?
45%
Reviews
?
57
Review Result ?
jattin01/avriti-backend · 557c2216
The commit improves the email template logic by conditionally rendering sections based on whether all items are services. However, inconsistent formatting and vague commit message reduce clarity. There are no obvious security or critical bug risks, but the incomplete commit message and lack of testing details lower confidence and business value.
Quality
?
60%
Security
?
50%
Business Value
?
50%
Maintainability
?
60%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Unclear And Contains Typos
Where
commit message
Issue / Evidence
unclear and contains typos
Suggested Fix
rewrite commit message to clearly and professionally describe the change
Variable Naming And Logic Clarity
Where
resources/views/emails/order-placed.blade.php:6
Issue / Evidence
variable naming and logic clarity
Suggested Fix
consider renaming $isAllService for clarity and add comments explaining this logic
Inconsistent Conditional Formatting
Where
resources/views/emails/order-placed.blade.php:170
Issue / Evidence
inconsistent conditional formatting
Suggested Fix
standardize spacing and indentation for better readability
Duplicate Logic
Where
resources/views/emails/order-placed.blade.php:195
Issue / Evidence
code duplication
Suggested Fix
review repeated conditional blocks to simplify or extract into reusable partials
Inline Styles Usage
Where
resources/views/emails/order-placed.blade.php:211
Issue / Evidence
inline styles usage
Suggested Fix
move styles to CSS files for maintainability and separation of concerns
Code Change Preview · resources/views/emails/order-placed.blade.php
?
Removed / Before Commit
- $billing = $orderData['billing_address'] ?? []; - $shipping_addr = $orderData['shipping_address'] ?? []; - $itemsCount = count($items); - $subtotal = (float) ($orderData['subtotal'] ?? 0); - $discount = (float) ($orderData['discount'] ?? 0); - $tax = (float) ($orderData['tax'] ?? 0); - <td style="font-size:13px; color:#555; padding:4px 0;">Tax</td> - <td align="right" style="font-size:13px; color:#1a1a1a; padding:4px 0;">₹{{ number_format($tax, 2) }}</td> - </tr> - <tr> - <td style="font-size:13px; color:#555; padding:4px 0;">Shipping</td> - <td align="right" style="font-size:13px; padding:4px 0; @if($shippingCost == 0) color:#22c55e; font-weight:600; @else color:#1a1a1a; @endif"> - @if($shippingCost == 0) Free @else ₹{{ number_format($shippingCost, 2) }} @endif - </td> - </tr> - </table> - <hr style="border:none; border-top:1px dashed #d0d9ff; margin:12px 0;"> - <table width="100%" cellpadding="0" cellspacing="0" border="0"
Added / After Commit
+ $billing = $orderData['billing_address'] ?? []; + $shipping_addr = $orderData['shipping_address'] ?? []; + $itemsCount = count($items); + $isAllService = $itemsCount > 0 && collect($items)->every(fn ($i) => ! empty($i['is_service'])); + $subtotal = (float) ($orderData['subtotal'] ?? 0); + $discount = (float) ($orderData['discount'] ?? 0); + $tax = (float) ($orderData['tax'] ?? 0); + <td style="font-size:13px; color:#555; padding:4px 0;">Tax</td> + <td align="right" style="font-size:13px; color:#1a1a1a; padding:4px 0;">₹{{ number_format($tax, 2) }}</td> + </tr> + @if(! $isAllService) + <tr> + <td style="font-size:13px; color:#555; padding:4px 0;">Shipping</td> + <td align="right" style="font-size:13px; padding:4px 0; @if($shippingCost == 0) color:#22c55e; font-weight:600; @else color:#1a1a1a; @endif"> + @if($shippingCost == 0) Free @else ₹{{ number_format($shippingCost, 2) }} @endif + </td> + </tr> + @endif