In “The PSR Coding Standards” we discussed how we have three options when picking a coding standard.
In this article, we’re going to discuss how we can implement the third option by creating our own standard for
phpcs using the PSR12 standard as a starting point. If you missed either our article about “The PSR Coding Standards” or “PHP_CodeSniffer” you might want to read them first.
One of our core tenets of development is that code is read more than it’s written. To that end, we must make our code as easy to read and understand as possible. No one writes perfect code on the first try so it’s important that we continually refine our code so it’s easy for the next developer to read even if we’re the next developer.
In this article, we’ll discuss what refactoring is, how to make it dead simple to do, and discuss the next set of articles in this series.Read More
In our previous article, we discussed how to use the PHP_CodeSniffer scripts from the command line to verify our code matches the standards we’ve created. The huge downside to that process is that we’re constantly having to switch between our editor and our terminal to check our code. It’s enough to make us want to pull out our hair.
In this article, we’ll discuss how to use the phpcs extension for Visual Studio Code to check our code as we write it.Read More
In our previous article, we discussed why we need a coding standard and why we should be using the PSR-2 or PSR-12 coding standards. In this article, we’re going to discuss a tool we can use to verify that our code is using that standard and correct it if it’s not.Read More
Happy World Backup Day!. To celebrate we’re doing a quick article to discuss a topic important to backups the Grandfather-father-son backup.Read More
There are as many ways of formatting our code as there are developers who write it. When we’re working on a team there needs to be a common way to format the code to maximize team cohesion.
By having a coding standard we can define exactly how we expect the code to be formatted and make it easier for everyone to read. In this article we’ll discuss why we need a coding standard, what should be included, and why we should start by looking at the PSR family of standards.Read More
Laravel 9 was released on February 8th, 2022 and it came with some nice new features that we want to highlight.
In this article, we’ll discuss how to work with enumerations in Laravel Framework 9+Read More
As developers, we’re always looking for ways to make sure that the code that we deliver to our customers is as error-free as possible. There are lots of ways that we can do this but most developers tend to rely on manual and automated testing.
Manual testing is flawed because we constantly have to redo our tests manually. Automated Tests are more efficient because it’s automatically done which can save us huge amounts of time. The downside is that they require a non-trivial amount of effort from the developers to create them off.
There’s a third option that’s generally overlooked as a way to improve our code’s quality requiring just a little extra effort on our part. That’s using static code analysis. In this article, we’ll discuss what static code analysis is and why we should be using it on every commit.Read More
Laravel 9 was released on 2/8/2022 and in this article, we’ll describe how to update our applications from Laravel 8 to Laravel 9.
If you’re upgrading from a previous version make sure you check out our article on how to upgrade to Laravel 8. You’ll have to upgrade through each version one at a time.Read More
subscribe via RSS