Skip to content

Commit

Permalink
Rename gen code classes
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Nov 10, 2023
1 parent d78b5db commit 2565cac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/AopCodeGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
final class AopCodeGen
{
public const INTERCEPT_STATEMENT = '\$this->_intercept(__FUNCTION__, func_get_args());';
/** @var AopCodeGenMethodSignature */
/** @var MethodSignatureString */
private $methodSignature;

public function __construct()
{
$this->methodSignature = new AopCodeGenMethodSignature(PHP_VERSION_ID);
$this->methodSignature = new MethodSignatureString(PHP_VERSION_ID);
}

/**
Expand All @@ -56,7 +56,7 @@ public function generate(ReflectionClass $sourceClass, BindInterface $bind, stri
$tokens = token_get_all($code);
$inClass = false;
$className = '';
$newCode = new AopCodeGenNewCode();
$newCode = new GeneratedCode();
$iterator = new ArrayIterator($tokens);

for ($iterator->rewind(); $iterator->valid(); $iterator->next()) {
Expand Down Expand Up @@ -99,7 +99,7 @@ public function generate(ReflectionClass $sourceClass, BindInterface $bind, stri
}

/** @param ReflectionClass<object> $class */
private function addMethods(AopCodeGenNewCode $newCode, ReflectionClass $class, BindInterface $bind): void
private function addMethods(GeneratedCode $newCode, ReflectionClass $class, BindInterface $bind): void
{
$bindings = array_keys($bind->getBindings());

Expand Down
2 changes: 1 addition & 1 deletion src/AopCodeGenNewCode.php → src/GeneratedCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use function preg_replace_callback;
use function sprintf;

final class AopCodeGenNewCode
final class GeneratedCode
{
/** @var string */
private $code = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use const PHP_MAJOR_VERSION;

/** @SuppressWarnings(PHPMD.CyclomaticComplexity) */
final class AopCodeGenMethodSignature
final class MethodSignatureString
{
/** @var TypeString */
private $typeString;
Expand Down

0 comments on commit 2565cac

Please sign in to comment.