Completed
Pull Request — master (#1150)
by
unknown
01:41
created
src/Livewire/LivewireServiceProvider.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
         });
62 62
     }
63 63
 
64
+    /**
65
+     * @param string $componentClassPath
66
+     */
64 67
     protected function getComponentName($componentClassPath, $module = null)
65 68
     {
66 69
         $dirs = explode('\\', $componentClassPath);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,6 +71,6 @@
 block discarded – undo
71 71
 
72 72
         $moduleNamePrefix = ($module) ? $module->getLowerName().'::' : null;
73 73
 
74
-       return $moduleNamePrefix . $componentName;
74
+        return $moduleNamePrefix . $componentName;
75 75
     }
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     protected function loadComponents()
32 32
     {
33
-        if (! class_exists('Livewire')) return false;
33
+        if (!class_exists('Livewire')) return false;
34 34
 
35 35
         $modules = \Module::toCollection();
36 36
 
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         
39 39
         $filesystem = new Filesystem();
40 40
 
41
-        $modules->map(function ($module) use ($filesystem, $defaultNamespace) {
41
+        $modules->map(function($module) use ($filesystem, $defaultNamespace) {
42 42
             $modulePath = $module->getPath();
43 43
 
44
-            $path = $modulePath. '/'. strtr($defaultNamespace, ['\\' => '/']);
44
+            $path = $modulePath.'/'.strtr($defaultNamespace, ['\\' => '/']);
45 45
 
46
-            $files = collect( $filesystem->isDirectory($path) ? $filesystem->allFiles($path) : [] );
46
+            $files = collect($filesystem->isDirectory($path) ? $filesystem->allFiles($path) : []);
47 47
 
48
-            $files->map(function ($file) use ($module, $path, $defaultNamespace) {
48
+            $files->map(function($file) use ($module, $path, $defaultNamespace) {
49 49
                 $componentPath = \Str::after($file->getPathname(), $path.'/');
50 50
 
51
-                $componentClassPath = strtr( $componentPath , ['/' => '\\', '.php' => '']);
51
+                $componentClassPath = strtr($componentPath, ['/' => '\\', '.php' => '']);
52 52
         
53 53
                 $componentName = $this->getComponentName($componentClassPath, $module);
54 54
 
55
-                $componentClassStr = '\\' . config('modules.namespace') . '\\' . $module->getName() . '\\' . $defaultNamespace . '\\' . $componentClassPath;
55
+                $componentClassStr = '\\'.config('modules.namespace').'\\'.$module->getName().'\\'.$defaultNamespace.'\\'.$componentClassPath;
56 56
 
57 57
                 $componentClass = get_class(new $componentClassStr);
58 58
 
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
 
72 72
         $moduleNamePrefix = ($module) ? $module->getLowerName().'::' : null;
73 73
 
74
-       return $moduleNamePrefix . $componentName;
74
+       return $moduleNamePrefix.$componentName;
75 75
     }
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
 
31 31
     protected function loadComponents()
32 32
     {
33
-        if (! class_exists('Livewire')) return false;
33
+        if (! class_exists('Livewire')) {
34
+            return false;
35
+        }
34 36
 
35 37
         $modules = \Module::toCollection();
36 38
 
Please login to merge, or discard this patch.
src/Commands/LivewireCommand.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,9 @@  discard block
 block discarded – undo
124 124
             ->map([\Str::class, 'kebab'])
125 125
             ->implode('/');
126 126
 
127
-        if ($this->option('view')) $path = strtr($this->option('view'), ['.' => '/']);
127
+        if ($this->option('view')) {
128
+            $path = strtr($this->option('view'), ['.' => '/']);
129
+        }
128 130
         
129 131
         $name = strtr($path, ['/' => '.']);
130 132
 
@@ -168,7 +170,9 @@  discard block
 block discarded – undo
168 170
 
169 171
     protected function createView($force = false, $inline = false)
170 172
     {
171
-        if ($inline) return false;
173
+        if ($inline) {
174
+            return false;
175
+        }
172 176
 
173 177
         $viewPath = $this->component->view->file;
174 178
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function handle()
44 44
     {
45
-        if (! class_exists('Livewire')) {
45
+        if (!class_exists('Livewire')) {
46 46
             $this->line("\n<options=bold,reverse;fg=red> WHOOPS! </> 
Please login to merge, or discard this patch.