Completed
Push — master ( a9bb65...7eff16 )
by Florin
03:45
created
ext.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
           );
34 34
         ");
35 35
 
36
-                $messengerDir = $phpbb_root_path . 'store/messenger';
36
+                $messengerDir = $phpbb_root_path.'store/messenger';
37 37
                 if (!is_dir($messengerDir)) {
38 38
                     mkdir($messengerDir, 0777);
39
-                    $filesDir = $messengerDir . '/files';
39
+                    $filesDir = $messengerDir.'/files';
40 40
                     if (!is_dir($filesDir)) {
41 41
                         mkdir($filesDir, 0777);
42 42
                     }
@@ -77,24 +77,24 @@  discard block
 block discarded – undo
77 77
     {
78 78
         global $phpbb_root_path;
79 79
 
80
-        $database = $phpbb_root_path . 'store/messenger.db';
80
+        $database = $phpbb_root_path.'store/messenger.db';
81 81
         if (is_file($database)) {
82 82
             unlink($database);
83 83
         }
84 84
 
85
-        $messengerDir = $phpbb_root_path . 'store/messenger';
85
+        $messengerDir = $phpbb_root_path.'store/messenger';
86 86
         if (is_dir($messengerDir)) {
87 87
             $objects = scandir($messengerDir);
88 88
             foreach ($objects as $object) {
89 89
                 if ($object != '.' && $object != '..') {
90
-                    if (filetype($messengerDir . "/" . $object) == "dir") {
91
-                        $dir = $messengerDir . "/" . $object;
90
+                    if (filetype($messengerDir."/".$object) == "dir") {
91
+                        $dir = $messengerDir."/".$object;
92 92
                         $subObjects = scandir($dir);
93
-                        if(count($subObjects) > 0) {
94
-                            foreach($subObjects as $subObject) {
95
-                                if($subObject != '.' && $subObject != '..') {
96
-                                    if(filetype($dir . '/' . $subObject) != 'dir') {
97
-                                        unlink($dir . '/' . $subObject);
93
+                        if (count($subObjects) > 0) {
94
+                            foreach ($subObjects as $subObject) {
95
+                                if ($subObject != '.' && $subObject != '..') {
96
+                                    if (filetype($dir.'/'.$subObject) != 'dir') {
97
+                                        unlink($dir.'/'.$subObject);
98 98
                                     }
99 99
                                 } else {
100 100
                                     continue;
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
                             }
103 103
 
104 104
                         }
105
-                        rmdir($messengerDir . "/" . $object);
105
+                        rmdir($messengerDir."/".$object);
106 106
                     } else {
107
-                        unlink($messengerDir . "/" . $object);
107
+                        unlink($messengerDir."/".$object);
108 108
                     }
109 109
                 }
110 110
             }
Please login to merge, or discard this patch.
event/main_listener.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,17 +67,17 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $context = new RequestContext();
69 69
         $context->fromRequest($this->symfony_request);
70
-        $baseUrl = generate_board_url(true) . $context->getBaseUrl();
70
+        $baseUrl = generate_board_url(true).$context->getBaseUrl();
71 71
 
72 72
         $scriptName = $this->symfony_request->getScriptName();
73 73
         $scriptName = substr($scriptName, -1, 1) == '/' ? '' : utf8_basename($scriptName);
74 74
 
75 75
         if ($scriptName != '') {
76
-            $baseUrl = str_replace('/' . $scriptName, '', $baseUrl);
76
+            $baseUrl = str_replace('/'.$scriptName, '', $baseUrl);
77 77
         }
78 78
 
79 79
         $friends = $this->model->getFriends();
80
-        $friends_online = array_filter($friends, function ($friend) {
80
+        $friends_online = array_filter($friends, function($friend) {
81 81
             return $friend['user_status'] != 0;
82 82
         });
83 83
         $this->template->assign_var('S_COUNT_FRIENDS', count($friends_online));
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $context = new RequestContext();
120 120
         $context->fromRequest($this->symfony_request);
121
-        $baseUrl = generate_board_url(true) . $context->getBaseUrl();
121
+        $baseUrl = generate_board_url(true).$context->getBaseUrl();
122 122
 
123 123
         $scriptName = $this->symfony_request->getScriptName();
124 124
         $scriptName = substr($scriptName, -1, 1) == '/' ? '' : utf8_basename($scriptName);
125 125
 
126 126
         if ($scriptName != '') {
127
-            $baseUrl = str_replace('/' . $scriptName, '', $baseUrl);
127
+            $baseUrl = str_replace('/'.$scriptName, '', $baseUrl);
128 128
         }
129 129
 
130 130
         $user_id = $event['member']['user_id'];
Please login to merge, or discard this patch.
models/main_model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
         $unsorted_messages = array_merge($sent, $inbox);
308 308
 
309
-        uasort($unsorted_messages, function ($a, $b) {
309
+        uasort($unsorted_messages, function($a, $b) {
310 310
             return ($a['sentAt'] > $b['sentAt']) ? -1 : 1;
311 311
         });
312 312
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 	 */
347 347
 	protected function parseFile($file, $type) {
348 348
 		$item = array();
349
-		$item['id'] = 'f_' . $file['id'];
349
+		$item['id'] = 'f_'.$file['id'];
350 350
 		$item['sender_id'] = $file['sender_id'];
351 351
 		$item['sender_avatar'] = $this->user_loader->get_avatar($file['sender_id'], true, true);
352 352
 		$item['receiver_id'] = $file['receiver_id'];
Please login to merge, or discard this patch.