Passed
Push — 1.0 ( 3459b6...bea942 )
by Provinsi
02:17
created
src/Models/LaravelOpdModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     use NodeTrait;
15 15
     
16 16
     protected $table = "ref_unkerjas";
17
-    protected $fillable = ['kunker','name','kunker_simral','levelunker'];
17
+    protected $fillable = ['kunker', 'name', 'kunker_simral', 'levelunker'];
18 18
     protected $hidden = [];
19 19
 }
20 20
 
Please login to merge, or discard this patch.
src/Http/Controllers/LaravelOpdController.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
         $nodes = LaravelOpdModel::get()->toTree();
26 26
         
27
-        $traverse = function ($categories, $prefix = '-') use (&$traverse) {
27
+        $traverse = function($categories, $prefix = '-') use (&$traverse) {
28 28
             foreach ($categories as $category) {
29 29
                 echo $prefix.' '.$category->kunker.' - '.$category->name.'<br>';
30 30
         
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         
35 35
         $traverse($nodes);        
36 36
 
37
-        return view('laravel-opd::unit_kerja.index',compact('opds'));
37
+        return view('laravel-opd::unit_kerja.index', compact('opds'));
38 38
         
39 39
     }
40 40
 
@@ -48,21 +48,21 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $unit_kerjas = LaravelOpdModel::all();
50 50
 
51
-        return view('laravel-opd::unit_kerja.create-child',compact('unit_kerjas'));
51
+        return view('laravel-opd::unit_kerja.create-child', compact('unit_kerjas'));
52 52
     }
53 53
 
54 54
     public function addChild($id)
55 55
     {
56
-        $unit_kerja = LaravelOpdModel::where('id',$id)->first();
56
+        $unit_kerja = LaravelOpdModel::where('id', $id)->first();
57 57
 
58
-        return view('laravel-opd::unit_kerja.add-child',compact('unit_kerja'));
58
+        return view('laravel-opd::unit_kerja.add-child', compact('unit_kerja'));
59 59
     }
60 60
     
61 61
     public function storeRoot(Request $request)
62 62
     {        
63
-        $check_root = LaravelOpdModel::where('id',$request->root);
63
+        $check_root = LaravelOpdModel::where('id', $request->root);
64 64
         
65
-        if($check_root->get()->isEmpty())
65
+        if ($check_root->get()->isEmpty())
66 66
         {                        
67 67
 
68 68
             $unit_kerja = LaravelOpdModel::create([
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function storeChild(Request $request)
86 86
     {
87
-        $check_root = LaravelOpdModel::where('id',$request->root);
87
+        $check_root = LaravelOpdModel::where('id', $request->root);
88 88
                           
89 89
             $check_root->first()->children()->create([
90 90
                 'kunker' => $request->c_kunker,
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@
 block discarded – undo
71 71
                 'name' => $request->name,
72 72
                 'levelunker' => $request->levelunker,
73 73
             ]);
74
-        }
75
-        else
74
+        } else
76 75
         {
77 76
             return redirect()->back();
78 77
         }
Please login to merge, or discard this patch.
src/LaravelOpd.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $nodes = LaravelOpdModel::get()->toTree();
38 38
         
39
-        $traverse = function ($categories, $prefix = '-') use (&$traverse) {
39
+        $traverse = function($categories, $prefix = '-') use (&$traverse) {
40 40
             foreach ($categories as $category) {
41 41
                 echo $prefix.' '.$category->kunker.' - '.$category->name.'<br>';
42 42
         
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function addChild($id)
64 64
     {
65
-        return $unit_kerja = LaravelOpdModel::where('id',$id)->first();
65
+        return $unit_kerja = LaravelOpdModel::where('id', $id)->first();
66 66
 
67 67
         //return view('unit_kerja.add-child',compact('unit_kerja'));
68 68
     }
69 69
     
70 70
     public function storeRoot($request = array())
71 71
     {        
72
-        $check_root = LaravelOpdModel::where('id',$request->root);
72
+        $check_root = LaravelOpdModel::where('id', $request->root);
73 73
         
74
-        if($check_root->first()->isEmpty())
74
+        if ($check_root->first()->isEmpty())
75 75
         {                        
76 76
 
77 77
             $unit_kerja = LaravelOpdModel::create([
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     public function storeChild($request = array())
95 95
     {
96
-        $check_root = LaravelOpdModel::where('id',$request->root);
96
+        $check_root = LaravelOpdModel::where('id', $request->root);
97 97
                           
98 98
             $check_root->first()->children()->create([
99 99
                 'kunker' => $request->c_kunker,
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@
 block discarded – undo
71 71
                 'name' => $request->name,
72 72
                 'levelunker' => $request->levelunker,
73 73
             ]);
74
-        }
75
-        else
74
+        } else
76 75
         {
77 76
             return redirect()->back();
78 77
         }
Please login to merge, or discard this patch.
src/database/migrations/2017_11_08_053023_create_laravel_opd_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
     {
17 17
         
18 18
 
19
-        Schema::create('ref_unkerjas', function (Blueprint $table) {            
19
+        Schema::create('ref_unkerjas', function(Blueprint $table) {            
20 20
             $table->increments('id');
21
-            $table->string('kunker',191)->index();
22
-            $table->string('name',191);
23
-            $table->string('kunker_simral',191)->nullable();
21
+            $table->string('kunker', 191)->index();
22
+            $table->string('name', 191);
23
+            $table->string('kunker_simral', 191)->nullable();
24 24
             $table->integer('levelunker');
25 25
             NestedSet::columns($table);
26 26
             $table->timestamps();            
Please login to merge, or discard this patch.
src/LaravelOpdServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
      */
43 43
     public function register()
44 44
     {
45
-        $this->app->singleton('laravel-opd', function ($app) {
45
+        $this->app->singleton('laravel-opd', function($app) {
46 46
             return new LaravelOpd;
47 47
         });
48 48
 
49
-        $this->app->singleton('command.laravel-opd', function ($app) {
49
+        $this->app->singleton('command.laravel-opd', function($app) {
50 50
             return new LaravelOpdCommand;
51 51
         });
52 52
 
Please login to merge, or discard this patch.
src/helpers/helpers.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 (! function_exists('laravelOpd')) {
3
+if (!function_exists('laravelOpd')) {
4 4
     function laravelOpd()
5 5
     {
6 6
         return 'Welcome to function laravelOpd() for Bantenprov\LaravelOpd package';
Please login to merge, or discard this patch.