for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SlayerBirden\DFCodeGeneration\Generator;
use Zend\Code\Reflection\ClassReflection;
trait BaseNameTrait
{
/**
* @var string
*/
private $baseName;
* @return string
* @throws \ReflectionException
public function getBaseName(): string
if ($this->baseName === null) {
$reflection = new ClassReflection($this->entityClassName);
entityClassName
SlayerBirden\DFCodeGener...Generator\BaseNameTrait
$this->baseName = $reflection->getShortName();
}
return $this->baseName;