Mercurial > packages > magicforger
diff src/Replacer/Replacer.php @ 14:c969ed13c570 main-dev
Changes for various files
| author | luka |
|---|---|
| date | Mon, 23 Sep 2024 20:35:14 -0400 |
| parents | 3426c7e91c24 |
| children | 19b7a8de0019 |
line wrap: on
line diff
--- a/src/Replacer/Replacer.php Wed Apr 24 20:11:52 2024 -0400 +++ b/src/Replacer/Replacer.php Mon Sep 23 20:35:14 2024 -0400 @@ -52,7 +52,7 @@ return $target; } - public function get_available_replacements() + public function get_available_replacements(): array { $table_name = $this->getTableInput(); $replacements = [ @@ -118,42 +118,42 @@ // Namespaces // // ////////////////////////////////////////// - public function getRootNamespace() + public function getRootNamespace(): string { return $this->laravel->getNamespace(); } - public function getModelNamespace(string $name = '') + public function getModelNamespace(string $name = ''): string { return $this->getRootNamespace().'Models'; } - public function getNamespacedModel(string $name = '') + public function getNamespacedModel(string $name = ''): string { return $this->getModelNamespace().'\\'.$this->model_name($name); } - public function getControllerNamespace(string $name = '') + public function getControllerNamespace(string $name = ''): string { return $this->getRootNamespace().'Http\\Controllers'; } - public function getRequestNamespace(string $name) + public function getRequestNamespace(string $name): string { return $this->getRootNamespace().'Http\\Requests\\'.$this->model_name($name); } - public function getStoreRequestNamespace(string $name) + public function getStoreRequestNamespace(string $name): string { return $this->getRequestNamespace($name); } - public function getUpdateRequestNamespace(string $name) + public function getUpdateRequestNamespace(string $name): string { return $this->getRequestNamespace($name); } - public function getRequestUses(string $name) + public function getRequestUses(string $name): string { return implode("\n", [ 'use '.$this->getRequestNamespace($name).'\\'.$this->store_request_name($name).';', @@ -161,7 +161,7 @@ ]); } - public function getRouteNamespace(string $name = '') + public function getRouteNamespace(string $name = ''): string { return $this->getRootNamespace().'Http\\Controllers'; }
