Completed
Push — master ( ea4501...3b85dc )
by Iman
02:07
created
src/WidgetGenerator.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 class WidgetGenerator extends LaravelGeneratorCommand 
8 8
 {
9
-	/**
9
+    /**
10 10
      * The name and signature of the console command.
11 11
      *
12 12
      * @var string
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     protected function getStub()
36 36
     {
37 37
        
38
-		return __DIR__.'/../stubs/widget.stub';
38
+        return __DIR__.'/../stubs/widget.stub';
39 39
        
40 40
     }
41 41
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     protected function getStub()
36 36
     {
37 37
        
38
-		return __DIR__.'/../stubs/widget.stub';
38
+		return __DIR__ . '/../stubs/widget.stub';
39 39
        
40 40
     }
41 41
 
Please login to merge, or discard this patch.
src/WidgetsServiceProvider.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,28 +7,28 @@  discard block
 block discarded – undo
7 7
 
8 8
 class WidgetsServiceProvider extends ServiceProvider {
9 9
 
10
-	/**
11
-	 * Bootstrap any application services.
12
-	 *
13
-	 * @return void
14
-	 */
15
-	public function boot()
16
-	{
10
+    /**
11
+     * Bootstrap any application services.
12
+     *
13
+     * @return void
14
+     */
15
+    public function boot()
16
+    {
17 17
         \Blade::directive('include_widget', function ($expression) {
18 18
             return "<?php echo $expression; ?>";
19 19
         });
20 20
 
21 21
         $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
22
-	}
23
-
24
-	/**
25
-	 * Register any application services.
26
-	 *
27
-	 * @return void
28
-	 */
29
-	public function register()
30
-	{
31
-		$this->app->singleton('command.imanghafoori.widget', function ($app) {
22
+    }
23
+
24
+    /**
25
+     * Register any application services.
26
+     *
27
+     * @return void
28
+     */
29
+    public function register()
30
+    {
31
+        $this->app->singleton('command.imanghafoori.widget', function ($app) {
32 32
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
33 33
         });
34 34
 
@@ -53,6 +53,6 @@  discard block
 block discarded – undo
53 53
         });
54 54
 
55 55
         $this->commands('command.imanghafoori.widget');
56
-	}
56
+    }
57 57
 
58 58
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 	 */
15 15
 	public function boot()
16 16
 	{
17
-        \Blade::directive('include_widget', function ($expression) {
17
+        \Blade::directive('include_widget', function($expression) {
18 18
             return "<?php echo $expression; ?>";
19 19
         });
20 20
 
21
-        $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
21
+        $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets');
22 22
 	}
23 23
 
24 24
 	/**
@@ -28,31 +28,31 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function register()
30 30
 	{
31
-		$this->app->singleton('command.imanghafoori.widget', function ($app) {
31
+		$this->app->singleton('command.imanghafoori.widget', function($app) {
32 32
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
33 33
         });
34 34
 
35
-        $this->app->singleton('imanghafoori.widget.normalizer', function () {
35
+        $this->app->singleton('imanghafoori.widget.normalizer', function() {
36 36
             return new Utils\Normalizer();
37 37
         });
38 38
 
39
-        $this->app->singleton('imanghafoori.widget.minifier', function () {
39
+        $this->app->singleton('imanghafoori.widget.minifier', function() {
40 40
             return new Utils\HtmlMinifier();
41 41
         });
42 42
 
43
-        $this->app->singleton('imanghafoori.widget.debugInfo', function () {
43
+        $this->app->singleton('imanghafoori.widget.debugInfo', function() {
44 44
             return new Utils\DebugInfo();
45 45
         });
46 46
 
47
-        $this->app->singleton('imanghafoori.widget.policies', function () {
47
+        $this->app->singleton('imanghafoori.widget.policies', function() {
48 48
             return new Utils\Policies();
49 49
         });
50 50
 
51
-        $this->app->singleton('imanghafoori.widget.cache', function () {
51
+        $this->app->singleton('imanghafoori.widget.cache', function() {
52 52
             return new Utils\Cache();
53 53
         });
54 54
 
55
-        $this->app->singleton('imanghafoori.widget.renderer', function ($app) {
55
+        $this->app->singleton('imanghafoori.widget.renderer', function($app) {
56 56
             return new Utils\WidgetRenderer();
57 57
         });
58 58
 
Please login to merge, or discard this patch.
src/Utils/Cache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     function cacheResult($args, $phpCode, $widget)
20 20
     {
21
-        $key = $this->makeCacheKey($args,$widget);
21
+        $key = $this->makeCacheKey($args, $widget);
22 22
 
23 23
         $cache = app('cache');
24 24
 
Please login to merge, or discard this patch.
src/Utils/WidgetRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     private function generateHtml($widget, ...$args)
45 45
     {
46 46
         // Everything inside this function is executed only when the cache is not available.
47
-        $expensivePhpCode = function () use ($widget, $args) {
47
+        $expensivePhpCode = function() use ($widget, $args) {
48 48
             $this->prepareDataForView($widget, $args);
49 49
             // render the template with the resulting data.
50 50
             return $this->renderTemplate($widget);
Please login to merge, or discard this patch.
src/Utils/Normalizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@
 block discarded – undo
69 69
             $presenter = get_class($this->widget) . 'Presenter';
70 70
             $method = null;
71 71
             if (!class_exists($presenter)) {
72
-                $this->widget->presenter =  null;
73
-                return ;
72
+                $this->widget->presenter = null;
73
+                return;
74 74
             }
75 75
         }
76 76
 
Please login to merge, or discard this patch.
src/BaseWidget.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function __invoke(...$args)
24 24
     {
25
-        return $this->render(...$args);;
25
+        return $this->render(...$args); ;
26 26
     }
27 27
     /**
28 28
      * This method is called when you try to print the object like an string in blade files.
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function __toString()
32 32
     {
33
-        return $this->render();;
33
+        return $this->render(); ;
34 34
     }
35 35
 
36 36
     /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function render(...$args)
41 41
     {
42
-        return app('imanghafoori.widget.renderer')->renderWidget($this,...$args);
42
+        return app('imanghafoori.widget.renderer')->renderWidget($this, ...$args);
43 43
     }
44 44
 
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/Utils/Policies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     /**
9 9
      * @return bool
10 10
      */
11
-    public function widgetShouldHaveDebugInfo(){
11
+    public function widgetShouldHaveDebugInfo() {
12 12
 
13 13
         return env('WIDGET_IDENTIFIER', true) && env('APP_ENV', 'production') === 'local';
14 14
     }
Please login to merge, or discard this patch.