for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Cowsayphp;
class Farm
{
/**
* @param $animal
* @return AnimalInterface
*/
public static function create($animal)
$result = null;
if(class_exists($animal)) {
$result = new $animal;
}
return $result;