Test Failed
Push — master ( c2873c...a077d1 )
by Jeroen
01:35
created
engine/classes/Elgg/Assets/ExternalFiles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
 			return $v->loaded == true && $v->location == $location;
181 181
 		});
182 182
 		if ($items) {
183
-			array_walk($items, function(&$v, $k){
183
+			array_walk($items, function(&$v, $k) {
184 184
 				$v = $v->url;
185 185
 			});
186 186
 		}
Please login to merge, or discard this patch.
engine/classes/Elgg/I18n/Translator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function __construct(Config $config) {
67 67
 		$this->config = $config;
68
-		$this->defaultPath = dirname(dirname(dirname(dirname(__DIR__)))) . "/languages/";
68
+		$this->defaultPath = dirname(dirname(dirname(dirname(__DIR__))))."/languages/";
69 69
 	}
70 70
 
71 71
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	public function translate($message_key, array $args = [], $language = "") {
99 99
 		if (!is_string($message_key) || strlen($message_key) < 1) {
100 100
 			_elgg_services()->logger->warn(
101
-				'$message_key needs to be a string in ' . __METHOD__ . '(), ' . gettype($message_key) . ' provided'
101
+				'$message_key needs to be a string in '.__METHOD__.'(), '.gettype($message_key).' provided'
102 102
 			);
103 103
 			return '';
104 104
 		}
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 	 * @return bool Success
328 328
 	 */
329 329
 	public function registerPluginTranslations($path) {
330
-		$languages_path = rtrim($path, "\\/") . "/languages";
330
+		$languages_path = rtrim($path, "\\/")."/languages";
331 331
 
332 332
 		// don't need to have translations
333 333
 		if (!is_dir($languages_path)) {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 			}
386 386
 
387 387
 			if (in_array($language_file, $load_language_files) || $load_all) {
388
-				$result = (include $path . $language_file);
388
+				$result = (include $path.$language_file);
389 389
 				if ($result === false) {
390 390
 					$return = false;
391 391
 					continue;
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 			
467 467
 			$completeness = $this->getLanguageCompleteness($k);
468 468
 			if ($completeness < 100) {
469
-				$installed[$k] .= " (" . $completeness . "% " . $this->translate('complete') . ")";
469
+				$installed[$k] .= " (".$completeness."% ".$this->translate('complete').")";
470 470
 			}
471 471
 		}
472 472
 
Please login to merge, or discard this patch.
engine/classes/Elgg/Database/SiteSecret.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 	 * @return SiteSecret
109 109
 	 */
110 110
 	public static function regenerate(ElggCrypto $crypto, ConfigTable $table) {
111
-		$key = 'z' . $crypto->getRandomString(31);
111
+		$key = 'z'.$crypto->getRandomString(31);
112 112
 
113 113
 		$table->set(self::CONFIG_KEY, $key);
114 114
 
Please login to merge, or discard this patch.
engine/classes/ElggPlugin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		if (is_object($path)) {
60 60
 			// database object
61 61
 			parent::__construct($path);
62
-			$this->path = _elgg_config()->plugins_path . $this->getID();
62
+			$this->path = _elgg_config()->plugins_path.$this->getID();
63 63
 			_elgg_cache_plugin_by_id($this);
64 64
 			return;
65 65
 		}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * @deprecated 3.0
148 148
 	 */
149 149
 	public function getFriendlyName() {
150
-		elgg_deprecated_notice(__METHOD__ . ' is deprecated. Use getDisplayName().', '3.0');
150
+		elgg_deprecated_notice(__METHOD__.' is deprecated. Use getDisplayName().', '3.0');
151 151
 	
152 152
 		return $this->getDisplayName();
153 153
 	}
@@ -1233,7 +1233,7 @@  discard block
 block discarded – undo
1233 1233
 			}
1234 1234
 			$this->manifest = $package->getManifest();
1235 1235
 		} catch (Exception $e) {
1236
-			_elgg_services()->logger->warn("Failed to load manifest for plugin $this->guid. " . $e->getMessage());
1236
+			_elgg_services()->logger->warn("Failed to load manifest for plugin $this->guid. ".$e->getMessage());
1237 1237
 			$this->errorMsg = $e->getmessage();
1238 1238
 		}
1239 1239
 
@@ -1253,7 +1253,7 @@  discard block
 block discarded – undo
1253 1253
 		try {
1254 1254
 			$this->package = new \ElggPluginPackage($this->path, false);
1255 1255
 		} catch (Exception $e) {
1256
-			_elgg_services()->logger->warn("Failed to load package for $this->guid. " . $e->getMessage());
1256
+			_elgg_services()->logger->warn("Failed to load package for $this->guid. ".$e->getMessage());
1257 1257
 			$this->errorMsg = $e->getmessage();
1258 1258
 		}
1259 1259
 
Please login to merge, or discard this patch.
engine/classes/ElggRewriteTester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
 		}
179 179
 
180 180
 		// create the .htaccess file
181
-		$result = copy(Paths::elgg() . "install/config/htaccess.dist", $file->getPath());
181
+		$result = copy(Paths::elgg()."install/config/htaccess.dist", $file->getPath());
182 182
 		if (!$result) {
183 183
 			$this->htaccessIssue = 'cannot_copy';
184 184
 			return false;
Please login to merge, or discard this patch.
engine/classes/ElggMemcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 	public function setNamespace($namespace = "default") {
169 169
 		$config_prefix = _elgg_config()->memcache_namespace_prefix;
170 170
 		if ($config_prefix) {
171
-			$namespace = $config_prefix . $namespace;
171
+			$namespace = $config_prefix.$namespace;
172 172
 		}
173 173
 		
174 174
 		parent::setNamespace($namespace);
Please login to merge, or discard this patch.
engine/classes/Elgg/Notifications/NotificationsService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 			$this->events[$type][$subtype] = [];
102 102
 		}
103 103
 
104
-		$action_list =& $this->events[$type][$subtype];
104
+		$action_list = & $this->events[$type][$subtype];
105 105
 		if ($actions) {
106 106
 			$action_list = array_unique(array_merge($action_list, $actions));
107 107
 		} elseif (!in_array('create', $action_list)) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 			}
290 290
 		}
291 291
 
292
-		$this->logger->info("Results for the notification event {$event->getDescription()}: " . print_r($result, true));
292
+		$this->logger->info("Results for the notification event {$event->getDescription()}: ".print_r($result, true));
293 293
 		return $result;
294 294
 	}
295 295
 
@@ -461,14 +461,14 @@  discard block
 block discarded – undo
461 461
 
462 462
 		$notification = $this->hooks->trigger('prepare', 'notification', $params, $notification);
463 463
 		if (!$notification instanceof Notification) {
464
-			throw new RuntimeException("'prepare','notification' hook must return an instance of " . Notification::class);
464
+			throw new RuntimeException("'prepare','notification' hook must return an instance of ".Notification::class);
465 465
 		}
466 466
 
467
-		$type = 'notification:' . $event->getDescription();
467
+		$type = 'notification:'.$event->getDescription();
468 468
 		if ($this->hooks->hasHandler('prepare', $type)) {
469 469
 			$notification = $this->hooks->trigger('prepare', $type, $params, $notification);
470 470
 			if (!$notification instanceof Notification) {
471
-				throw new RuntimeException("'prepare','$type' hook must return an instance of " . Notification::class);
471
+				throw new RuntimeException("'prepare','$type' hook must return an instance of ".Notification::class);
472 472
 			}
473 473
 		} else {
474 474
 			// pre Elgg 1.9 notification message generation
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 
478 478
 		$notification = $this->hooks->trigger('format', "notification:$method", [], $notification);
479 479
 		if (!$notification instanceof Notification) {
480
-			throw new RuntimeException("'format','notification:$method' hook must return an instance of " . Notification::class);
480
+			throw new RuntimeException("'format','notification:$method' hook must return an instance of ".Notification::class);
481 481
 		}
482 482
 
483 483
 		if ($this->hooks->hasHandler('send', "notification:$method")) {
@@ -491,9 +491,9 @@  discard block
 block discarded – undo
491 491
 			if ($this->logger->getLevel() == Logger::INFO) {
492 492
 				$logger_data = print_r((array) $notification->toObject(), true);
493 493
 				if ($result) {
494
-					$this->logger->info("Notification sent: " . $logger_data);
494
+					$this->logger->info("Notification sent: ".$logger_data);
495 495
 				} else {
496
-					$this->logger->info("Notification was not sent: " . $logger_data);
496
+					$this->logger->info("Notification was not sent: ".$logger_data);
497 497
 				}
498 498
 			}
499 499
 			return $result;
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
 			'method' => $method,
676 676
 		];
677 677
 		$subject = $this->getDeprecatedNotificationSubject($entity->getType(), $entity->getSubtype());
678
-		$string = $subject . ": " . $entity->getURL();
678
+		$string = $subject.": ".$entity->getURL();
679 679
 		$body = $this->hooks->trigger('notify:entity:message', $entity->getType(), $params, $string);
680 680
 
681 681
 		if ($subject) {
Please login to merge, or discard this patch.
engine/classes/Elgg/PluginHooksService.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
 
62 62
 			if (in_array($name, ['forward', 'action', 'route'])) {
63 63
 				// assume the handler is going to exit the request...
64
-				$exit_warning = function () use ($name, $type, $handler, $handlers) {
64
+				$exit_warning = function() use ($name, $type, $handler, $handlers) {
65 65
 					_elgg_services()->deprecation->sendNotice(
66 66
 						"'$name', '$type' plugin hook should not be used to serve a response. Instead return an "
67 67
 						. "appropriate ResponseBuilder instance from an action or page handler. Do not terminate "
Please login to merge, or discard this patch.
engine/classes/Elgg/Cache/ViewCacher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 			$this->views->registerPluginViews(Paths::project());
36 36
 
37 37
 			// Core view definitions in /engine/views.php
38
-			$file = Paths::elgg() . 'engine/views.php';
38
+			$file = Paths::elgg().'engine/views.php';
39 39
 			if (is_file($file)) {
40 40
 				$spec = Includer::includeFile($file);
41 41
 				if (is_array($spec)) {
Please login to merge, or discard this patch.