Passed
Branch master (a46fef)
by Adrian
09:07
created
src/Abstractor/Eloquent/Relation/Relation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
     public function getPresentation()
71 71
     {
72
-        return $this->presentation ? : ucfirst(str_replace('_', ' ', $this->name));
72
+        return $this->presentation ?: ucfirst(str_replace('_', ' ', $this->name));
73 73
     }
74 74
 
75 75
     public function getType()
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/Relation/Select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     {
104 104
         $results = $this->eloquentRelation->getResults();
105 105
 
106
-        if (! empty($results)) {
106
+        if (!empty($results)) {
107 107
             $field->setValue($results->getKey());
108 108
         }
109 109
         return $field;
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/Relation/Traits/CheckRelationCompatibility.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
     public function checkRelationCompatibility()
10 10
     {
11
-        if (! in_array(get_class($this->eloquentRelation), $this->compatibleEloquentRelations)) {
11
+        if (!in_array(get_class($this->eloquentRelation), $this->compatibleEloquentRelations)) {
12 12
             throw new RelationException(get_class($this->eloquentRelation)." eloquent relation is not compatible with ".$this->getType()." type");
13 13
         }
14 14
     }
Please login to merge, or discard this patch.
src/Abstractor/Eloquent/RelationFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function get($name)
74 74
     {
75
-        if (! empty($this->config) && ! empty($this->config['name'])) {
75
+        if (!empty($this->config) && !empty($this->config['name'])) {
76 76
             $name = $this->config['name'];
77 77
         }
78
-        if (! method_exists($this->model, $name)) {
79
-            throw new FactoryException("Relation " . $name . " does not exist on " . get_class($this->model));
78
+        if (!method_exists($this->model, $name)) {
79
+            throw new FactoryException("Relation ".$name." does not exist on ".get_class($this->model));
80 80
         }
81 81
 
82 82
         $relationInstance = $this->model->$name();
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 
85 85
 
86 86
         if (empty($this->config['type'])) {
87
-            if (! array_key_exists($relationEloquentType, $this->eloquentTypeToRelationType)) {
88
-                throw new FactoryException($relationEloquentType . " relation not supported");
87
+            if (!array_key_exists($relationEloquentType, $this->eloquentTypeToRelationType)) {
88
+                throw new FactoryException($relationEloquentType." relation not supported");
89 89
             }
90 90
 
91 91
             $type = $this->eloquentTypeToRelationType[$relationEloquentType];
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
             $type = $this->config['type'];
94 94
         }
95 95
 
96
-        if (! array_key_exists($type, $this->typesMap)) {
97
-            throw new FactoryException("Unexpected relation type: " . $type);
96
+        if (!array_key_exists($type, $this->typesMap)) {
97
+            throw new FactoryException("Unexpected relation type: ".$type);
98 98
         }
99 99
 
100 100
         $this->config['name'] = $name;
Please login to merge, or discard this patch.
src/CrudModuleProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 
48 48
         $this->app->bind(
49 49
             'Anavel\Crud\Contracts\Abstractor\FieldFactory',
50
-            function () {
50
+            function() {
51 51
                 return new FieldAbstractorFactory(new FormFactory);
52 52
             }
53 53
         );
54 54
 
55 55
         $this->app->bind(
56 56
             'Anavel\Crud\Contracts\Abstractor\RelationFactory',
57
-            function () {
57
+            function() {
58 58
                 return new RelationAbstractorFactory(
59 59
                     $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'],
60 60
                     $this->app['Anavel\Crud\Contracts\Abstractor\FieldFactory']
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $this->app->bind(
66 66
             'Anavel\Crud\Contracts\Abstractor\ModelFactory',
67
-            function () {
67
+            function() {
68 68
                 return new ModelAbstractorFactory(
69 69
                     config('anavel-crud.models'),
70 70
                     $this->app['ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager'],
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $this->app->bind(
79 79
             'Anavel\Crud\Contracts\Form\Generator',
80
-            function () {
80
+            function() {
81 81
                 return new FormGenerator(new FormFactory);
82 82
             }
83 83
         );
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
         'prefix' => 'crud',
6 6
         'namespace' => 'Anavel\Crud\Http\Controllers'
7 7
     ],
8
-    function () {
8
+    function() {
9 9
         Route::get('/', [
10 10
             'as'   => 'anavel-crud.home',
11 11
             'uses' => 'HomeController@index'
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use EasySlugger\Slugger;
4 4
 
5
-if (! function_exists('slugify')) {
5
+if (!function_exists('slugify')) {
6 6
     /**
7 7
      * Generate slug
8 8
      *
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     }
16 16
 }
17 17
 
18
-if (! function_exists('uniqueSlugify')) {
18
+if (!function_exists('uniqueSlugify')) {
19 19
     /**
20 20
      * Generate unique slug
21 21
      *
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 }
30 30
 
31
-if (! function_exists('transcrud')) {
31
+if (!function_exists('transcrud')) {
32 32
     /**
33 33
      * Translate string but remove file key if translation not found
34 34
      *
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     function transcrud($text)
39 39
     {
40
-        $translation = trans('anavel-crud::models.' . $text);
40
+        $translation = trans('anavel-crud::models.'.$text);
41 41
 
42 42
         return str_replace('anavel-crud::models.', '', $translation);
43 43
     }
Please login to merge, or discard this patch.