@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | parent::__construct($app); |
36 | 36 | |
37 | 37 | if ($this->app['config']->get('repository') === null) { |
38 | - $this->app['config']->set('repository', require __DIR__.'/config/repository.php'); |
|
38 | + $this->app['config']->set('repository', require __DIR__ . '/config/repository.php'); |
|
39 | 39 | } |
40 | - $interfaces= str_plural(Config::get('repository.interface')); |
|
41 | - $repositories= str_plural(Config::get('repository.repository')); |
|
42 | - $interface= Config::get('repository.interface'); |
|
43 | - $repository= Config::get('repository.repository'); |
|
40 | + $interfaces = str_plural(Config::get('repository.interface')); |
|
41 | + $repositories = str_plural(Config::get('repository.repository')); |
|
42 | + $interface = Config::get('repository.interface'); |
|
43 | + $repository = Config::get('repository.repository'); |
|
44 | 44 | |
45 | - $contractsFolder = Config::get('repository.app_path').'/'.$interfaces; |
|
45 | + $contractsFolder = Config::get('repository.app_path') . '/' . $interfaces; |
|
46 | 46 | |
47 | 47 | if ($contractsFolder) { |
48 | 48 | $directory = new \RecursiveDirectoryIterator($contractsFolder); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | $regex = new \RegexIterator($iterator, '/^.+\.php$/i', \RecursiveRegexIterator::GET_MATCH); |
51 | 51 | foreach ($regex as $name => $value) { |
52 | 52 | |
53 | - $contract = strstr($name,'app'); |
|
54 | - $contract = rtrim($contract,'.php'); |
|
55 | - $contract = ltrim($contract,'app'); |
|
56 | - $contract = ltrim($contract,'/'); |
|
57 | - $contract = ltrim($contract,'\\'); |
|
53 | + $contract = strstr($name, 'app'); |
|
54 | + $contract = rtrim($contract, '.php'); |
|
55 | + $contract = ltrim($contract, 'app'); |
|
56 | + $contract = ltrim($contract, '/'); |
|
57 | + $contract = ltrim($contract, '\\'); |
|
58 | 58 | |
59 | 59 | $contractName = "App\\" . str_replace('/', '\\', $contract); |
60 | 60 | |
61 | 61 | $repositoryClass = str_replace($interfaces, $repositories, $contractName); |
62 | - $repositoryClass = str_replace([$interface,'Interface'], $repository, $repositoryClass); |
|
62 | + $repositoryClass = str_replace([$interface, 'Interface'], $repository, $repositoryClass); |
|
63 | 63 | |
64 | 64 | $this->providers[] = $contractName; |
65 | 65 | $this->bindings[$contractName] = $repositoryClass; |