Completed
Push — master ( 57b97a...66fabe )
by Joao
03:00
created
src/Models/Comment.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,10 +78,11 @@
 block discarded – undo
78 78
      */
79 79
     public function getCreatedByAttribute($value)
80 80
     {
81
-        if ($value > 0)
82
-            if ($user = Sentinel::findUserById($value))
81
+        if ($value > 0) {
82
+                    if ($user = Sentinel::findUserById($value))
83 83
                 if ($user != null)
84 84
                     return $user;
85
+        }
85 86
 
86 87
         return $value;
87 88
     }
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * All the "restricted area" routes
7 7
  * are defined here.
8 8
  */
9
-Route::group(array('prefix' => '/admin', 'middleware' => ['webAdmin', 'auth']), function ()
9
+Route::group(array('prefix' => '/admin', 'middleware' => ['webAdmin', 'auth']), function()
10 10
 {
11 11
 
12 12
     # Delete comments
Please login to merge, or discard this patch.
src/Controllers/CommentsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
             return Redirect::route('posts')->with('error', $error);
62 62
         }
63 63
 
64
-        Base::Log('Comment (' . $comment->id . ') was deleted.');
64
+        Base::Log('Comment ('.$comment->id.') was deleted.');
65 65
 
66 66
         // Delete the post
67 67
         $comment->delete();
Please login to merge, or discard this patch.
src/commentsServiceProvider.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,26 +39,26 @@  discard block
 block discarded – undo
39 39
         // Publish our views
40 40
         $this->loadViewsFrom(base_path("resources/views"), 'base');
41 41
         $this->publishes([
42
-            __DIR__ .  '/views' => base_path("resources/views")
42
+            __DIR__.'/views' => base_path("resources/views")
43 43
         ]);
44 44
 
45 45
         // Publish our migrations
46 46
         $this->publishes([
47
-            __DIR__ .  '/migrations' => base_path("database/migrations")
47
+            __DIR__.'/migrations' => base_path("database/migrations")
48 48
         ], 'migrations');
49 49
 
50 50
         // Publish a config file
51 51
         $this->publishes([
52
-            __DIR__ . '/config' => base_path('/config')
52
+            __DIR__.'/config' => base_path('/config')
53 53
         ], 'config');
54 54
 
55 55
         // Publish our routes
56 56
         $this->publishes([
57
-            __DIR__ .  '/routes.php' => base_path("app/Http/comments_routes.php")
57
+            __DIR__.'/routes.php' => base_path("app/Http/comments_routes.php")
58 58
         ], 'routes');
59 59
 
60 60
         // Include the routes file
61
-        if(file_exists(base_path("app/Http/comments_routes.php")))
61
+        if (file_exists(base_path("app/Http/comments_routes.php")))
62 62
             include base_path("app/Http/comments_routes.php");
63 63
     }
64 64
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     protected function registerComment()
71 71
     {
72
-        $this->app->singleton('jlourenco.comments.comment', function ($app) {
72
+        $this->app->singleton('jlourenco.comments.comment', function($app) {
73 73
             $baseConfig = $app['config']->get('jlourenco.base');
74 74
             $config = $app['config']->get('jlourenco.comments');
75 75
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function registerComments()
92 92
     {
93
-        $this->app->singleton('comments', function ($app) {
93
+        $this->app->singleton('comments', function($app) {
94 94
             $blog = new Comments($app['jlourenco.comments.comment']);
95 95
 
96 96
             return $blog;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,9 @@  discard block
 block discarded – undo
58 58
         ], 'routes');
59 59
 
60 60
         // Include the routes file
61
-        if(file_exists(base_path("app/Http/comments_routes.php")))
62
-            include base_path("app/Http/comments_routes.php");
61
+        if(file_exists(base_path("app/Http/comments_routes.php"))) {
62
+                    include base_path("app/Http/comments_routes.php");
63
+        }
63 64
     }
64 65
 
65 66
     /**
@@ -76,8 +77,9 @@  discard block
 block discarded – undo
76 77
             $model = array_get($config, 'models.comment');
77 78
             $users = array_get($baseConfig, 'models.User');
78 79
 
79
-            if (class_exists($model) && method_exists($model, 'setUsersModel'))
80
-                forward_static_call_array([$model, 'setUsersModel'], [$users]);
80
+            if (class_exists($model) && method_exists($model, 'setUsersModel')) {
81
+                            forward_static_call_array([$model, 'setUsersModel'], [$users]);
82
+            }
81 83
 
82 84
             return new CommentRepository($model);
83 85
         });
Please login to merge, or discard this patch.
src/Repositories/CommentRepository.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct($model = null)
22 22
     {
23
-        if (isset($model))
24
-            $this->model = $model;
23
+        if (isset($model)) {
24
+                    $this->model = $model;
25
+        }
25 26
     }
26 27
 
27 28
     /**
Please login to merge, or discard this patch.
src/migrations/2016_01_15_000000_create_comments_tables.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
     public function up()
15 15
     {
16 16
 
17
-        Schema::create('Comment', function (Blueprint $table) {
17
+        Schema::create('Comment', function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->integer('parent')->unsigned()->nullable();
20 20
             $table->text('comment');
Please login to merge, or discard this patch.