PSR1 recommends that each class should be in its own file to aid autoloaders.
Having each class in a dedicated file usually plays nice with PSR autoloaders
and is therefore a well established practice. If you use other autoloaders, you
might not want to follow this rule.
Loading history...
17
{
18
/**
19
* @var HydratorInterface
20
*/
21
private $hydrator;
22
23
protected function setUp()
24
{
25
$this->hydrator = new ObjectProperty();
26
$this->hydrator->addStrategy('code', new RegexpObscuredStrategy('/[abc]{2}/', '**'));
Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.