Skip to content

Instantly share code, notes, and snippets.

@guillegette
guillegette / gist:da63d24880334518af3d
Last active August 29, 2015 14:18
Improved set function
/**
* Original
* Set name of the the item
*
* @param string $name
*/
public function setName($name = "")
{
if (empty($name)) {
throw new \Exception("Item name can't be empty");