Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Aug 30, 2023
1 parent 37367cd commit 935490b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public function compile(): int
printf("Success: %d Failed: %d\n", $this->newInstance->getCompiled(), count($this->newInstance->getFailed()));
printf("Preload compile: %s\n", $this->dumpAutoload->getFileInfo($preload));
printf("Object graph diagram: %s\n", realpath($dot));
foreach ($this->newInstance->getFailed() as $depedencyIndex => $error) {
printf("UNBOUND: %s for %s \n", $error, $depedencyIndex);
foreach ($this->newInstance->getFailed() as $dependencyIndex => $error) {
printf("UNBOUND: %s for %s \n", $error, $dependencyIndex);
}

return $failed ? 1 : 0;
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/CompileAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public function __invoke(): int
/** @var list<string> $classes */
$classes = (array) $this->classes;
$paths = $this->getPaths($classes);
$autolaod = $this->saveAutoloadFile($this->appMeta->appDir, $paths);
$autoload = $this->saveAutoloadFile($this->appMeta->appDir, $paths);
$start = $_SERVER['REQUEST_TIME_FLOAT'] ?? 0;
assert(is_float($start));
$time = number_format(microtime(true) - $start, 2);
$memory = number_format(memory_get_peak_usage() / (1024 * 1024), 3);
printf("Compilation (2/2) took %f seconds and used %fMB of memory\n", $time, $memory);
printf("autoload.php: %s\n", $this->getFileInfo($autolaod));
printf("autoload.php: %s\n", $this->getFileInfo($autoload));

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Injector/PackageInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ public static function getInstance(AbstractAppMeta $meta, string $context, Cache
return $injector;
}

public static function factory(AbstractAppMeta $meta, string $context, AbstractModule|null $overideModule = null): InjectorInterface
public static function factory(AbstractAppMeta $meta, string $context, AbstractModule|null $overrideModule = null): InjectorInterface
{
$scriptDir = $meta->tmpDir . '/di';
! is_dir($scriptDir) && ! @mkdir($scriptDir) && ! is_dir($scriptDir);
$module = (new Module())($meta, $context);

if ($overideModule instanceof AbstractModule) {
$module->override($overideModule);
if ($overrideModule instanceof AbstractModule) {
$module->override($overrideModule);
}

$injector = new RayInjector($module, $scriptDir);
Expand Down
4 changes: 2 additions & 2 deletions src/LazyModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use BEAR\AppMeta\AbstractAppMeta;
use BEAR\Package\Module\ResourceObjectModule;
use BEAR\Package\Module\ScriptinjectorModule;
use BEAR\Package\Module\ScriptInjectorModule;
use Ray\Compiler\LazyModuleInterface;
use Ray\Di\AbstractModule;

Expand All @@ -21,7 +21,7 @@ public function __construct(

public function __invoke(): AbstractModule
{
$module = new ScriptinjectorModule($this->scriptDir, (new Module())($this->appMeta, $this->context));
$module = new ScriptInjectorModule($this->scriptDir, (new Module())($this->appMeta, $this->context));
$module->install(new ResourceObjectModule($this->appMeta->getResourceListGenerator()));

return $module;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* Provides InjectorInterface
*/
class ScriptinjectorModule extends AbstractModule
class ScriptInjectorModule extends AbstractModule
{
public function __construct(
private string $scriptDir,
Expand Down

0 comments on commit 935490b

Please sign in to comment.