lancepioch / tree

Connect your Github Repository to your Forge Server and Tree automatically deploys any new pull requests for you
MIT License
11 stars 3 forks source link

Laravel Analyzer #7

Closed lancepioch closed 6 years ago

lancepioch commented 6 years ago

This pull request includes changes and recommendations for crafting your application "The Laravel Way". Feel free to commit any additional changes to the shift-8513 branch.

Before merging, you should:

If you want help with your upgrade, check out the Shift Human Services or join the Shifty Coders Slack room to get answers to all your Laravel questions.

lancepioch commented 6 years ago

⚠ The following files reference Laravel facades through the global namespace. For example, you're referencing \DB or importing use DB. Instead import Illuminate\Support\Facades\DB and reference DB.

While global references are allowed through aliases, you should import the facade explicitly. This can improve clarity not only for developers, but static analysis used by your IDE.

lancepioch commented 6 years ago

⚠ The following classes do not extend the standard Laravel Model and Controller class. This may add complexity which makes your application harder to upgrade. Often a trait can be used instead of inheritance. You should review the following classes:

lancepioch commented 6 years ago

⚠ The following controllers contain actions outside of the 7 resource actions (index, create, store, show, edit, update, destroy). For more details, review the docs or watch Cruddy by Design to see if you can rework these into resource controllers.

lancepioch commented 6 years ago

ℹ Your Laravel application contains 43 classes and 857 lines of code, with an average of 5.46 lines of code per method.

Most of your classes are Controllers. Your Jobs contain the most lines of code (125 loc) and your Jobs have the highest lines of code per method (12.5 loc).

lancepioch commented 6 years ago

⚠ Shift found the following config files differ from the defaults. While you are welcome to customize your configuration, you should leverage ENV variables rather than hardcode values. If you find you're adding a lot of configuration options, consider creating a domain specific config file, such as core.php. Both will make app upgrades and deployments easier.

lancepioch commented 6 years ago

ℹ If you have manually upgraded your app from previous versions of Laravel, you should run the Laravel Linter to ensure your app is fully upgraded to the latest version of Laravel.

codecov[bot] commented 6 years ago

Codecov Report

Merging #7 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master       #7      +/-   ##
============================================
+ Coverage     93.02%   93.06%   +0.04%     
  Complexity       82       82              
============================================
  Files            22       22              
  Lines           301      303       +2     
============================================
+ Hits            280      282       +2     
  Misses           21       21
Impacted Files Coverage Δ Complexity Δ
app/Http/Controllers/WebhookController.php 97.67% <100%> (+0.11%) 14 <0> (ø) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f9b2cdf...098e9cb. Read the comment docs.