Completed
Branch master (7b1660)
by Felix
02:35
created
src/Felixkiss/UniqueWithValidator/UniqueWithValidatorServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     {
27 27
         // Whenever the validator factory is accessed in the container, we set
28 28
         // the custom resolver on it (this works in Larvel >= 5.2 as well).
29
-        $this->app->resolving('validator', function ($factory, $app) {
30
-            $factory->resolver(function ($translator, $data, $rules, $messages, $customAttributes = []) {
29
+        $this->app->resolving('validator', function($factory, $app) {
30
+            $factory->resolver(function($translator, $data, $rules, $messages, $customAttributes = []) {
31 31
                 return new ValidatorExtension(
32 32
                     $translator,
33 33
                     $data,
Please login to merge, or discard this patch.
src/Felixkiss/UniqueWithValidator/ValidatorExtension.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function __construct($translator, $data, $rules, $messages, array $customAttributes = array())
11 11
     {
12 12
         // Set custom validation error messages
13
-        if(!isset($messages['unique_with']))
13
+        if (!isset($messages['unique_with']))
14 14
         {
15 15
             $messages['unique_with'] = $translator->get(
16 16
                 'uniquewith-validator::validation.unique_with'
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
             if (count($parameter) > 1)
68 68
             {
69 69
                 $column_name = $parameter[1];
70
-            }
71
-            else
70
+            } else
72 71
             {
73 72
                 $column_name = $field_name;
74 73
             }
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
             if ($field_name == $column)
79 78
             {
80 79
                 $column = $column_name;
81
-            }
82
-            else
80
+            } else
83 81
             {
84 82
                 $extra[$column_name] = array_get($this->data, $field_name);
85 83
             }
Please login to merge, or discard this patch.