Continuous Learning
Author image

Daniel Mecke

2 Posts

Simple Wrapper

We write conditionals all the time. Often, we check for very simple things, not worth any extra effort of encapsulation. But in many cases, this makes perfect sense even for very basic things. Let me give you an example:

$date = new \DateTime('2016-05-15');
if ($date->format('N') == 6 || $date-&
Continue Reading