Completed
Push — master ( 0ef8bc...0c26a9 )
by Maxime
02:49
created
src/Distilleries/FormBuilder/FormValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                 if ($field->getType() == 'form')
76 76
                 {
77 77
 
78
-                    $validation = Validator::make($this->formHelper->getRequest()->get($field->getName(),[]), $field->getClass()->getRules());
78
+                    $validation = Validator::make($this->formHelper->getRequest()->get($field->getName(), []), $field->getClass()->getRules());
79 79
 
80 80
                     if ($validation->fails())
81 81
                     {
Please login to merge, or discard this patch.
src/views/form/partial/form.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(empty($formOptions['url'])){
3
+if (empty($formOptions['url'])) {
4 4
     $formOptions['url'] = config('app.url').'/'.request()->path();
5 5
 }
6 6
 
Please login to merge, or discard this patch.
src/Distilleries/FormBuilder/FormBuilderServiceProvider.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -86,6 +86,9 @@
 block discarded – undo
86 86
         $this->registerAliasIfNotExists('Redirect', \Illuminate\Support\Facades\Redirect::class);
87 87
     }
88 88
 
89
+    /**
90
+     * @param string $alias
91
+     */
89 92
     private function registerAliasIfNotExists($alias, $class)
90 93
     {
91 94
         if (! array_key_exists($alias, AliasLoader::getInstance()->getAliases())) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
     {
16 16
         parent::boot();
17 17
 
18
-        $this->loadViewsFrom(__DIR__ . '/../../views', 'form-builder');
19
-        $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'form-builder');
18
+        $this->loadViewsFrom(__DIR__.'/../../views', 'form-builder');
19
+        $this->loadTranslationsFrom(__DIR__.'/../../lang', 'form-builder');
20 20
 
21
-        $this->publishes([__DIR__ . '/../../config/config.php' => config_path('form-builder.php')]);
22
-        $this->publishes([__DIR__ . '/../../views' => base_path('resources/views/vendor/form-builder')], 'views');
21
+        $this->publishes([__DIR__.'/../../config/config.php' => config_path('form-builder.php')]);
22
+        $this->publishes([__DIR__.'/../../views' => base_path('resources/views/vendor/form-builder')], 'views');
23 23
 
24
-        $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'form-builder');
24
+        $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'form-builder');
25 25
     }
26 26
 
27 27
     public function register()
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
         $this->registerHtmlIfNeeded();
32 32
         $this->registerFormIfHeeded();
33 33
 
34
-        $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'laravel-form-builder');
34
+        $this->mergeConfigFrom(__DIR__.'/../../config/config.php', 'laravel-form-builder');
35 35
 
36 36
         $this->registerFormHelper();
37 37
 
38
-        $this->app->singleton('laravel-form-builder', function ($app) {
38
+        $this->app->singleton('laravel-form-builder', function($app) {
39 39
             return new FormBuilder($app, $app['laravel-form-helper']);
40 40
         });
41 41
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     protected function registerFormHelper()
48 48
     {
49
-        $this->app->singleton('laravel-form-helper', function ($app) {
49
+        $this->app->singleton('laravel-form-helper', function($app) {
50 50
             $config = $app['config']->get('form-builder');
51 51
             return new FormHelper($app['view'], $app['request'], $config);
52 52
         });
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
     private function registerHtmlIfNeeded()
58 58
     {
59
-        if (! $this->app->offsetExists('html')) {
60
-            $this->app->singleton('html', function ($app) {
59
+        if (!$this->app->offsetExists('html')) {
60
+            $this->app->singleton('html', function($app) {
61 61
                 return new LaravelHtml($app['url'], $app['view']);
62 62
             });
63 63
 
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 
68 68
     private function registerFormIfHeeded()
69 69
     {
70
-        if (! $this->app->offsetExists('form')) {
71
-            $this->app->singleton('form', function ($app) {
70
+        if (!$this->app->offsetExists('form')) {
71
+            $this->app->singleton('form', function($app) {
72 72
                 $form = new LaravelForm($app['html'], $app['url'], $app['view'], $app['session.store']->getToken());
73 73
                 return $form->setSessionStore($app['session.store']);
74 74
             });
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     private function registerAliasIfNotExists($alias, $class)
90 90
     {
91
-        if (! array_key_exists($alias, AliasLoader::getInstance()->getAliases())) {
91
+        if (!array_key_exists($alias, AliasLoader::getInstance()->getAliases())) {
92 92
             AliasLoader::getInstance()->alias($alias, $class);
93 93
         }
94 94
     }
Please login to merge, or discard this patch.
src/views/form/partial/tag.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
                 @if ($showField)
15 15
                     @if (isset($noEdit) and $noEdit === true)
16 16
                         <?php
17
-                        if (! empty($options['default_value'])) {
17
+                        if (!empty($options['default_value'])) {
18 18
                             $options['default_value'] = is_string($options['default_value']) ? explode(',', $options['default_value']) : $options['default_value'];
19 19
                         }
20 20
                         ?>
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
                             @endforeach
25 25
                         @endif
26 26
                     @else
27
-                        <?php $options['class'] = isset($options['class']) ? $options['class'] . ' tags ' : ' tags '; ?>
27
+                        <?php $options['class'] = isset($options['class']) ? $options['class'].' tags ' : ' tags '; ?>
28 28
                         {!! Form::input($type, $name, $options['default_value'], $options['attr']) !!}
29 29
                     @endif
30 30
                 @endif
Please login to merge, or discard this patch.