for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByTIC\Namefy;
/**
* Class Namefy
* @package ByTIC\Namefy
*/
class Namefy
{
* @param null|string $name
* @return Generator|Generator\HasStrategy|Strategies\AbstractStrategy|null
public static function strategy($name = null)
if ($name === null) {
return static::self()->getStrategy();
}
return static::self()->setStrategy($name);
* @param string $name
* @return Name
public static function model($name): Name
return static::from($name, 'model');
public static function repository($name): Name
return static::from($name, 'repository');
public static function controller($name): Name
return static::from($name, 'controller');
* @param string $type
protected static function from(string $name, $type): Name
return static::self()->from($name, $type);
protected static function self(): Generator
static $instance;
if (!($instance instanceof Generator)) {
$instance = new Generator();
return $instance;