Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Saiuto2598yI don't want to spoil it for you but it looks like you could use at least a little refactoring. In fact all my DRY senses are tingling.
-
appmaker3958ySo as someone said about DRY principle. You should probably make a function which can set each property for each of your objects. As I see that each object has the same property, you should try to not repeat yourself as much as possible. I do not know whether your learning to code or not but just trying to keep yourself === DRY is a good practice :) have fun coding
-
arekxv10548yAs a seasoned programmer. This kinda hurts my eyes. :)
Trust me usng DRY and refactoring code is a really good thing to do, especially in larger projects :) -
carlos4188yAgreed with what others said but doing these sort of mistakes is what will make you a better coder so keep coding :D
Related Rants
Code night :)
undefined
php
code