Passed
Push — master ( f00d3e...ae1a55 )
by Mohammad
02:51
created
src/RepositoryServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.