Courses🔥 10th Anniversary 🔥AI WorkshopCompaniesPricingBlogConfAiBotSubscribeSign in
  • Courses
  • 🔥 10th Anniversary 🔥
  • AI Workshop
  • Companies
  • Pricing
  • Blog
  • ConfAiBot
Subscribe
  • Courses
  • Companies
  • Communities
  • Blog
  • Gift card
  • Newsletter
  • Help
  • Shop
  • ConfAiBot
  • Contact
  • Legal notice
  • General conditions
  • Privacy policy
  • Cookies policy
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium

Automatic Code Generation with IntelliJ and PhpStorm

15 October 2015 | screencasts

Get the generated code for constructors, getters, and setters to follow your own naming conventions! Create a class, define what class attributes it has, and ask IntelliJ or PhpStorm to generate the constructor and some getters and setters for us. This is something we have been doing since the days of Eclipse or NetBeans, the problem is: Can we get this generated code to follow our naming conventions? In this video, we will see just that, how to configure IntelliJ or PhpStorm so that the code it generates follows the structure we define (prefixes "a" or "an" for constructor input parameters and setters, prefixes "some" and "all" for element arrays, and some more tricks).

Related Material

As I mentioned in the video, here’s the repository with the settings used. In this repository, you will find the content of the .jar file that PhpStorm generates when exporting these settings. This way, you can play around and, if you want, make a Pull Request with your modifications :) . If you only want to import the settings, here’s the .jar ready for import. I also especially recommend that if you are interested in this type of settings for PhpStorm, you check out the video on namespaces and Composer autoloader since we set up PhpStorm there to generate classes with the appropriate namespace according to PSR-4. Additionally, the video on configuring PhpStorm to follow the PSR-2 coding style standard might also be useful for you.

Video

Tags

IntelliJBasic LevelPhpStorm
AnteriorWhat are Code Smells and Refactoring
SiguienteSoftware Craftsmanship Barcelona 2015

Pay according to your needs

lite (only monthly)

19 €
per month
  • Essential programming courses to build a solid foundation
  • Company invoice

standard

24,92 €
Save vs monthly of 49 €
Annual payment of 299 €
per month
  • Main catalog to master writing maintainable, scalable, and testable code
  • Receive job offers verified by Codely
  • Company invoice
Save 189 €

premium

33,25 €
Save vs monthly of 89 €
100 € anniversary discount
Annual payment of 399 €
per month
  • Exclusive AI courses to keep you always up to date
  • Early access to new courses
  • Discount on workshops
  • Receive job offers verified by Codely
  • Company invoice

We won't increase the price while your subscription is active