for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Formularium\Factory;
trait NamespaceTrait
{
/**
* Namespaces to search
*
* @var string[]
*/
protected static $baseNamespaces = [
'Formularium'
];
* External factory functions.
* @var callable[]
protected static $factories = [];
public static function registerFactory(callable $factory): void
static::$factories[] = $factory;
}
* @param string $ns The namespace to add
* @return void
* @codeCoverageIgnore
public static function appendBaseNamespace(string $ns): void
static::$baseNamespaces[] = $ns;
* @return string[]
public static function getBaseNamespaces(): array
return static::$baseNamespaces;