Completed
Push — master ( 9b9e7a...58d84b )
by Pavel
02:36
created
app/database/migrations/20170128112159_create_access_tokens_table.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 class CreateAccessTokensTable
5 5
 {
6 6
     /**
7
-    * Do the migration
8
-    */
7
+     * Do the migration
8
+     */
9 9
     public function up()
10 10
     {
11 11
         Capsule::schema()->create('access_tokens', function($table)
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
     }
20 20
 
21 21
     /**
22
-    * Undo the migration
23
-    */
22
+     * Undo the migration
23
+     */
24 24
     public function down()
25 25
     {
26 26
         Capsule::schema()->drop('access_tokens');
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
     */
9 9
     public function up()
10 10
     {
11
-        Capsule::schema()->create('access_tokens', function($table)
12
-        {
11
+        Capsule::schema()->create('access_tokens', function($table) {
13 12
             $table->increments('id');
14 13
             $table->integer('user_id')->unsigned()->index();
15 14
             $table->string('access_token')->unique()->nullable();
Please login to merge, or discard this patch.
app/database/migrations/20170129140408_create_refresh_tokens_table.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 class CreateRefreshTokensTable
5 5
 {
6 6
     /**
7
-    * Do the migration
8
-    */
7
+     * Do the migration
8
+     */
9 9
     public function up()
10 10
     {
11 11
         Capsule::schema()->create('refresh_tokens', function($table)
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
     }
20 20
 
21 21
     /**
22
-    * Undo the migration
23
-    */
22
+     * Undo the migration
23
+     */
24 24
     public function down()
25 25
     {
26 26
         Capsule::schema()->drop('refresh_tokens');
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
     */
9 9
     public function up()
10 10
     {
11
-        Capsule::schema()->create('refresh_tokens', function($table)
12
-        {
11
+        Capsule::schema()->create('refresh_tokens', function($table) {
13 12
             $table->increments('id');
14 13
             $table->integer('user_id')->unsigned()->index();
15 14
             $table->string('refresh_token')->unique()->nullable();
Please login to merge, or discard this patch.
app/src/Model/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             return false;
139 139
         }
140 140
 
141
-        $timestamp = (int) substr($token, strrpos($token, '_') + 1);
141
+        $timestamp = (int)substr($token, strrpos($token, '_') + 1);
142 142
         $expire    = 3600;
143 143
         return $timestamp + $expire >= time();
144 144
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function generatePasswordResetToken()
150 150
     {
151
-        $this->password_reset_token = Helper::generateRandomString() . '_' . time();
151
+        $this->password_reset_token = Helper::generateRandomString().'_'.time();
152 152
     }
153 153
 
154 154
     /**
Please login to merge, or discard this patch.
app/src/Providers/MailerServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         $config = $container['settings'];
17 17
 
18
-        $container['mailer'] = function () use ($config) {
18
+        $container['mailer'] = function() use ($config) {
19 19
             $transport = \Swift_MailTransport::newInstance();
20 20
             $mailer    = \Swift_Mailer::newInstance($transport);
21 21
 
Please login to merge, or discard this patch.
app/src/Providers/ErrorHandlerServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function register(Container $container)
16 16
     {
17
-        $container['errorHandler'] = function (Container $container) {
17
+        $container['errorHandler'] = function(Container $container) {
18 18
             return function($request, $response, $exception) use ($container) {
19 19
                 $details = (defined('DEBUG_MODE') && DEBUG_MODE == 1) ? $exception->getMessage() : 'Internal server error';
20 20
                 $error   = new JsonException(null, 500, 'Internal server error', $details);
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
             };
24 24
         };
25 25
 
26
-        $container['notAllowedHandler'] = function () {
26
+        $container['notAllowedHandler'] = function() {
27 27
             return function($request, $response, $methods) {
28 28
                 throw new JsonException(null, 405, 'Method Not Allowed', 'Method must be one of: '.implode(', ', $methods));
29 29
             };
30 30
         };
31 31
 
32
-        $container['notFoundHandler'] = function () {
32
+        $container['notFoundHandler'] = function() {
33 33
             return function() {
34 34
                 throw new JsonException(null, 404, 'Not found', 'Entity not found');
35 35
             };
Please login to merge, or discard this patch.
app/src/Providers/RendererServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
     {
18 18
         $config = $container['settings'];
19 19
 
20
-        $container['renderer'] = function () use ($config) {
20
+        $container['renderer'] = function() use ($config) {
21 21
             $renderer = new Renderer($config);
22 22
 
23 23
             return $renderer;
24 24
         };
25 25
 
26
-        $container['mailRenderer'] = function () use ($config) {
26
+        $container['mailRenderer'] = function() use ($config) {
27 27
             $renderer = new MailRenderer($config['mailTemplate']);
28 28
 
29 29
             return $renderer;
Please login to merge, or discard this patch.
app/src/Providers/LogServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $config = $container['settings']['logger'];
20 20
 
21
-        $container['logger'] = function () use ($config) {
21
+        $container['logger'] = function() use ($config) {
22 22
             $logger = new Logger($config['name']);
23 23
             $logger->pushProcessor(new UidProcessor());
24 24
             $logger->pushHandler(new StreamHandler($config['path'], $config['level']));
Please login to merge, or discard this patch.
app/src/Providers/ValidationServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $config = $container['settings'];
22 22
 
23 23
         // translation
24
-        $container['translator'] = function () use ($config) {
24
+        $container['translator'] = function() use ($config) {
25 25
             $translateFileLoader = new FileLoader(new Filesystem, $config['translate']['path']);
26 26
             $translator          = new Translator($translateFileLoader, $config['translate']['locale']);
27 27
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         };
30 30
 
31 31
         // validation
32
-        $container['validation'] = function (Container $c) use ($config) {
32
+        $container['validation'] = function(Container $c) use ($config) {
33 33
             $validation = new Factory($c->get('translator'));
34 34
             $presence   = new DatabasePresenceVerifier($c->get('databaseManager'));
35 35
             $validation->setPresenceVerifier($presence);
Please login to merge, or discard this patch.
app/src/Providers/AclServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $config = $container['settings']['acl'];
18 18
 
19
-        $container['acl'] = function () use ($config) {
19
+        $container['acl'] = function() use ($config) {
20 20
             $acl = new Acl($config);
21 21
 
22 22
             return $acl;
Please login to merge, or discard this patch.