Measure PHP Code Quality With Static Analysis Using PHPStan

preview_player
Показать описание
Measure PHP Code Quality With Static Analysis Using PHPStan to check coding standards. (see shortcuts below to key points) Adam Culp of Beachcasts php programming videos shows how to get clean code with PHPStan for static code analysis for code quality.

Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!

Key Topics:
- What is static analysis and sniffing for code smells
- Using PHPStan for static code analysis
- Setting up PHPStan run level, and outputting results to a file

Errata:
Let me know if you notice anything that should be errata

Associated Links:

Timeline:
00:00 Video start
02:18 Introduction to the video sponsor Cloudways
03:00 Introduction to PHPStan for static code analysis
04:05 The Composer command to include PHPStan in a project
05:28 How to launch PHPStan to analyze code
06:47 Example output from PHPStan
07:45 Change the run level for PHPStan to analyze code
08:25 How to output results from PHPStan to a file
09:00 Instruct PHPStan to format output in various formats
10:49 Bonus: Running PHPStan using the php-code-quality Docker image

Other Beachcasts videos you might find interesting:

Help through referrals:

#php #phpstan #beachcasts
Рекомендации по теме
Комментарии
Автор

I love your elephants 😍 great explanation

Emerii
Автор

Long time no see Adam !! Very interesting tool ! Thanks for the video !

sophiebeaupuis
Автор

We just started to use PHPStan in a pretty big application. Needless to say that even on a mere level 6 we had roughly 1000 errors to start with (6.5k basefile lines). Rule of thumb is that whenever we touch a file we just gonna improve upon it. We're down to 4k lines in baseline file which is just great. Code does become way more stable using tools like this. It does catch issues that - when just writing down code - you simply don't catch.

manuakasam
Автор

I develop mainly for Drupal, and find PHPStan essential.

lostcarpark
Автор

Hello !! Hi, I really like a lot of your videos. About code quality I'm implementing some commit verification routines with their own hooks, for that I needed to add a development dependency on nodejs with npm the husky, with it I can only validate code that is on stage.
I would like to know if you know any tools in PHP that fill this need.

jeferson-guedes
Автор

Would you be interested in presenting via Zoom in January?

Abc-slnf
Автор

if we are talking about something five years old as new thing, we have a problem

zbynekriha
join shbcf.ru