Skip to content

Commit

Permalink
Update some statments (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
BadJacky authored Jun 17, 2024
1 parent 5ac3c6b commit e385360
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/CodeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

interface CodeGenerator
{
public function generator();
public function generator(): void;

public function preview();
public function preview(): string;
}
5 changes: 1 addition & 4 deletions src/MineGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ abstract class MineGenerator

protected string $namespace;

protected ContainerInterface $container;

/**
* MineGenerator constructor.
*/
public function __construct(ContainerInterface $container)
public function __construct(protected ContainerInterface $container)
{
$this->setStubDir(
realpath(
Expand All @@ -39,7 +37,6 @@ public function __construct(ContainerInterface $container)
)
) . DIRECTORY_SEPARATOR . 'Stubs' . DIRECTORY_SEPARATOR
);
$this->container = $container;
}

public function getStubDir(): string
Expand Down
3 changes: 1 addition & 2 deletions src/ModuleGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class ModuleGenerator extends MineGenerator

/**
* 设置模块信息.
* @return $this
*/
public function setModuleInfo(array $moduleInfo): ModuleGenerator
public function setModuleInfo(array $moduleInfo): static
{
$this->moduleInfo = $moduleInfo;
return $this;
Expand Down

0 comments on commit e385360

Please sign in to comment.