__toString() public method

public __toString ( ) : string
return string PHP code
 /**
  * @param ClassType $classType
  * @param string $dir
  */
 private function createClass(ClassType $classType, $dir = "")
 {
     if ($dir) {
         $dir = "/{$dir}";
     }
     $filePath = $this->target . "{$dir}/" . $classType->getName() . ".php";
     if (!file_exists($filePath)) {
         file_put_contents($filePath, "<?php" . PHP_EOL . PHP_EOL . $classType->__toString());
     }
 }