@@ -711,7 +711,7 @@ |
||
711 | 711 | * @see get_members_of_access_collection() |
712 | 712 | * |
713 | 713 | * @param int $collection_id The collection ID |
714 | - * @return \ElggAccessCollection|false |
|
714 | + * @return string |
|
715 | 715 | */ |
716 | 716 | public function get($collection_id) { |
717 | 717 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Get a map of all loaded translations |
80 | 80 | * |
81 | - * @return array |
|
81 | + * @return string |
|
82 | 82 | */ |
83 | 83 | public function getLoadedTranslations() { |
84 | 84 | return $this->translations; |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | * |
479 | 479 | * @param string $language Language |
480 | 480 | * |
481 | - * @return int |
|
481 | + * @return double |
|
482 | 482 | */ |
483 | 483 | public function getLanguageCompleteness($language) { |
484 | 484 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | /** |
580 | 580 | * Returns an array of language codes. |
581 | 581 | * |
582 | - * @return array |
|
582 | + * @return string[] |
|
583 | 583 | */ |
584 | 584 | public static function getAllLanguageCodes() { |
585 | 585 | return [ |
@@ -65,7 +65,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -180,7 +180,7 @@ |
||
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 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * |
152 | 152 | * @param string $action The action being performed |
153 | 153 | * |
154 | - * @return mixed True if valid or redirects. |
|
154 | + * @return boolean True if valid or redirects. |
|
155 | 155 | * @access private |
156 | 156 | */ |
157 | 157 | function action_gatekeeper($action) { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * Regenerate a new site key (32 bytes: "z" to indicate format + 186-bit key in Base64 URL). |
184 | 184 | * |
185 | - * @return mixed The site secret hash |
|
185 | + * @return string The site secret hash |
|
186 | 186 | * @access private |
187 | 187 | */ |
188 | 188 | function init_site_secret() { |
@@ -108,7 +108,7 @@ |
||
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 |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | /** |
454 | 454 | * Elgg's front controller. Handles basically all incoming URL requests. |
455 | 455 | * |
456 | - * @return bool True if Elgg will handle the request, false if the server should (PHP-CLI server) |
|
456 | + * @return boolean|null True if Elgg will handle the request, false if the server should (PHP-CLI server) |
|
457 | 457 | */ |
458 | 458 | public static function index() { |
459 | 459 | $req = Request::createFromGlobals(); |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | /** |
471 | 471 | * Routes the request, booting core if not yet booted |
472 | 472 | * |
473 | - * @return bool False if Elgg wants the PHP CLI server to handle the request |
|
473 | + * @return boolean|null False if Elgg wants the PHP CLI server to handle the request |
|
474 | 474 | */ |
475 | 475 | public function run() { |
476 | 476 | $config = $this->services->config; |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | * @param int $linenum The line number the error was raised at |
782 | 782 | * @param array $vars An array that points to the active symbol table where error occurred |
783 | 783 | * |
784 | - * @return true |
|
784 | + * @return boolean |
|
785 | 785 | * @throws \Exception |
786 | 786 | * @access private |
787 | 787 | */ |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | if ($config->elgg_config_locks) { |
98 | - $lock = function ($name) use ($config) { |
|
98 | + $lock = function($name) use ($config) { |
|
99 | 99 | $config->lock($name); |
100 | 100 | }; |
101 | 101 | } else { |
102 | 102 | // the installer needs to build an application with defaults then update |
103 | 103 | // them after they're validated, so we don't want to lock them. |
104 | - $lock = function () { |
|
104 | + $lock = function() { |
|
105 | 105 | }; |
106 | 106 | } |
107 | 107 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | if ($config->dataroot) { |
116 | - $config->dataroot = rtrim($config->dataroot, '\\/') . DIRECTORY_SEPARATOR; |
|
116 | + $config->dataroot = rtrim($config->dataroot, '\\/').DIRECTORY_SEPARATOR; |
|
117 | 117 | } else { |
118 | 118 | if (!$config->installer_running) { |
119 | 119 | throw new ConfigurationException('Config value "dataroot" is required.'); |
@@ -122,14 +122,14 @@ discard block |
||
122 | 122 | $lock('dataroot'); |
123 | 123 | |
124 | 124 | if ($config->cacheroot) { |
125 | - $config->cacheroot = rtrim($config->cacheroot, '\\/') . DIRECTORY_SEPARATOR; |
|
125 | + $config->cacheroot = rtrim($config->cacheroot, '\\/').DIRECTORY_SEPARATOR; |
|
126 | 126 | } else { |
127 | 127 | $config->cacheroot = $config->dataroot; |
128 | 128 | } |
129 | 129 | $lock('cacheroot'); |
130 | 130 | |
131 | 131 | if ($config->wwwroot) { |
132 | - $config->wwwroot = rtrim($config->wwwroot, '/') . '/'; |
|
132 | + $config->wwwroot = rtrim($config->wwwroot, '/').'/'; |
|
133 | 133 | } else { |
134 | 134 | $config->wwwroot = $this->services->request->sniffElggUrl(); |
135 | 135 | } |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $locked_props = [ |
149 | 149 | 'site_guid' => 1, |
150 | 150 | 'path' => Paths::project(), |
151 | - 'plugins_path' => Paths::project() . "mod/", |
|
152 | - 'pluginspath' => Paths::project() . "mod/", |
|
151 | + 'plugins_path' => Paths::project()."mod/", |
|
152 | + 'pluginspath' => Paths::project()."mod/", |
|
153 | 153 | 'url' => $config->wwwroot, |
154 | 154 | ]; |
155 | 155 | foreach ($locked_props as $name => $value) { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | } |
198 | 198 | |
199 | 199 | $setups = []; |
200 | - $path = Paths::elgg() . 'engine/lib'; |
|
200 | + $path = Paths::elgg().'engine/lib'; |
|
201 | 201 | |
202 | 202 | // include library files, capturing setup functions |
203 | 203 | foreach (self::getEngineLibs() as $file) { |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $config = $this->services->config; |
259 | 259 | |
260 | 260 | if ($this->isTestingApplication()) { |
261 | - throw new \RuntimeException('Unit tests should not call ' . __METHOD__); |
|
261 | + throw new \RuntimeException('Unit tests should not call '.__METHOD__); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | if ($config->boot_complete) { |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | // as a custom plugin that is always loaded last and can't be disabled... |
298 | 298 | if (!$config->system_cache_loaded) { |
299 | 299 | // configure view locations for the custom plugin (not Elgg core) |
300 | - $viewsFile = Paths::project() . 'views.php'; |
|
300 | + $viewsFile = Paths::project().'views.php'; |
|
301 | 301 | if (is_file($viewsFile)) { |
302 | 302 | $viewsSpec = Includer::includeFile($viewsFile); |
303 | 303 | if (is_array($viewsSpec)) { |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | } |
315 | 315 | |
316 | 316 | // This is root directory start.php |
317 | - $root_start = Paths::project() . "start.php"; |
|
317 | + $root_start = Paths::project()."start.php"; |
|
318 | 318 | if (is_file($root_start)) { |
319 | 319 | require $root_start; |
320 | 320 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | if (isset(self::$public_services[$name])) { |
365 | 365 | return $this->services->{$name}; |
366 | 366 | } |
367 | - trigger_error("Undefined property: " . __CLASS__ . ":\${$name}"); |
|
367 | + trigger_error("Undefined property: ".__CLASS__.":\${$name}"); |
|
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | if ($spec['request'] instanceof Request) { |
415 | 415 | $spec['service_provider']->setValue('request', $spec['request']); |
416 | 416 | } else { |
417 | - throw new \InvalidArgumentException("Given request is not a " . Request::class); |
|
417 | + throw new \InvalidArgumentException("Given request is not a ".Request::class); |
|
418 | 418 | } |
419 | 419 | } |
420 | 420 | |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | if ($spec['handle_shutdown']) { |
429 | 429 | // we need to register for shutdown before Symfony registers the |
430 | 430 | // session_write_close() function. https://github.com/Elgg/Elgg/issues/9243 |
431 | - register_shutdown_function(function () { |
|
431 | + register_shutdown_function(function() { |
|
432 | 432 | // There are cases where we may exit before this function is defined |
433 | 433 | if (function_exists('_elgg_shutdown_hook')) { |
434 | 434 | _elgg_shutdown_hook(); |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | } |
479 | 479 | |
480 | 480 | // overwrite value from settings |
481 | - $www_root = rtrim($request->getSchemeAndHttpHost() . $request->getBaseUrl(), '/') . '/'; |
|
481 | + $www_root = rtrim($request->getSchemeAndHttpHost().$request->getBaseUrl(), '/').'/'; |
|
482 | 482 | $config->wwwroot = $www_root; |
483 | 483 | $config->wwwroot_cli_server = $www_root; |
484 | 484 | } |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | ini_set('display_errors', 1); |
557 | 557 | $is_cli = (php_sapi_name() === 'cli'); |
558 | 558 | |
559 | - $forward = function ($url) use ($is_cli) { |
|
559 | + $forward = function($url) use ($is_cli) { |
|
560 | 560 | if ($is_cli) { |
561 | 561 | echo "Open $url in your browser to continue."; |
562 | 562 | exit; |
@@ -576,14 +576,14 @@ discard block |
||
576 | 576 | } |
577 | 577 | |
578 | 578 | $site_url = _elgg_config()->url; |
579 | - $site_host = parse_url($site_url, PHP_URL_HOST) . '/'; |
|
579 | + $site_host = parse_url($site_url, PHP_URL_HOST).'/'; |
|
580 | 580 | |
581 | 581 | // turn any full in-site URLs into absolute paths |
582 | 582 | $forward_url = get_input('forward', '/admin', false); |
583 | 583 | $forward_url = str_replace([$site_url, $site_host], '/', $forward_url); |
584 | 584 | |
585 | 585 | if (strpos($forward_url, '/') !== 0) { |
586 | - $forward_url = '/' . $forward_url; |
|
586 | + $forward_url = '/'.$forward_url; |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | if ($is_cli || (get_input('upgrade') == 'upgrade')) { |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | } |
606 | 606 | } else { |
607 | 607 | $rewriteTester = new \ElggRewriteTester(); |
608 | - $url = elgg_get_site_url() . "__testing_rewrite?__testing_rewrite=1"; |
|
608 | + $url = elgg_get_site_url()."__testing_rewrite?__testing_rewrite=1"; |
|
609 | 609 | if (!$rewriteTester->runRewriteTest($url)) { |
610 | 610 | // see if there is a problem accessing the site at all |
611 | 611 | // due to ip restrictions for example |
@@ -792,9 +792,9 @@ discard block |
||
792 | 792 | * @access private |
793 | 793 | */ |
794 | 794 | public function handleErrors($errno, $errmsg, $filename, $linenum, $vars) { |
795 | - $error = date("Y-m-d H:i:s (T)") . ": \"$errmsg\" in file $filename (line $linenum)"; |
|
795 | + $error = date("Y-m-d H:i:s (T)").": \"$errmsg\" in file $filename (line $linenum)"; |
|
796 | 796 | |
797 | - $log = function ($message, $level) { |
|
797 | + $log = function($message, $level) { |
|
798 | 798 | if (self::$core_loaded) { |
799 | 799 | return elgg_log($message, $level); |
800 | 800 | } |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | * @deprecated |
851 | 851 | */ |
852 | 852 | public function loadSettings() { |
853 | - trigger_error(__METHOD__ . ' is no longer needed and will be removed.'); |
|
853 | + trigger_error(__METHOD__.' is no longer needed and will be removed.'); |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | /** |
@@ -74,7 +74,6 @@ |
||
74 | 74 | /** |
75 | 75 | * Handle a request for a cached view |
76 | 76 | * |
77 | - * @param array $path URL path |
|
78 | 77 | * @return Response (unprepared) |
79 | 78 | */ |
80 | 79 | public function handleRequest(Request $request) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | return $this->send403(); |
117 | 117 | } |
118 | 118 | |
119 | - $etag = '"' . md5($content) . '"'; |
|
119 | + $etag = '"'.md5($content).'"'; |
|
120 | 120 | $this->setRevalidateHeaders($etag, $response); |
121 | 121 | if ($this->is304($etag)) { |
122 | 122 | return Response::create()->setNotModified(); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | // trust the client but check for an existing cache file |
134 | - $filename = $config->cacheroot . "views_simplecache/$ts/$viewtype/$view"; |
|
134 | + $filename = $config->cacheroot."views_simplecache/$ts/$viewtype/$view"; |
|
135 | 135 | if (file_exists($filename)) { |
136 | 136 | $this->sendCacheHeaders($etag, $response); |
137 | 137 | return BinaryFileResponse::create($filename, 200, $response->headers->all()); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $lastcache = (int) $config->lastcache; |
152 | 152 | |
153 | - $filename = $config->cacheroot . "views_simplecache/$lastcache/$viewtype/$view"; |
|
153 | + $filename = $config->cacheroot."views_simplecache/$lastcache/$viewtype/$view"; |
|
154 | 154 | |
155 | 155 | if ($lastcache == $ts) { |
156 | 156 | $this->sendCacheHeaders($etag, $response); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | protected function isCacheableView($view) { |
215 | 215 | if (preg_match('~^languages/(.*)\.js$~', $view, $m)) { |
216 | - return in_array($m[1], _elgg_services()->translator->getAllLanguageCodes()); |
|
216 | + return in_array($m[1], _elgg_services()->translator->getAllLanguageCodes()); |
|
217 | 217 | } |
218 | 218 | return _elgg_services()->views->isCacheableView($view); |
219 | 219 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | * |
130 | 130 | * @param string $name The name of the config value |
131 | 131 | * |
132 | - * @return mixed|null |
|
132 | + * @return string|boolean |
|
133 | 133 | */ |
134 | 134 | function get($name) { |
135 | 135 | $sql = " |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * |
250 | 250 | * @param string $location 'head' or 'footer' |
251 | 251 | * |
252 | - * @return array |
|
252 | + * @return string[] |
|
253 | 253 | * @since 1.8.0 |
254 | 254 | */ |
255 | 255 | function elgg_get_loaded_js($location = 'head') { |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | /** |
301 | 301 | * Get the loaded CSS URLs |
302 | 302 | * |
303 | - * @return array |
|
303 | + * @return string[] |
|
304 | 304 | * @since 1.8.0 |
305 | 305 | */ |
306 | 306 | function elgg_get_loaded_css() { |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * @param string $type Type of file: js or css |
356 | 356 | * @param string $location Page location |
357 | 357 | * |
358 | - * @return array |
|
358 | + * @return string[] |
|
359 | 359 | * @since 1.8.0 |
360 | 360 | */ |
361 | 361 | function elgg_get_loaded_external_files($type, $location) { |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | * @param string $directory Directory to look in |
371 | 371 | * @param array $exceptions Array of filenames to ignore |
372 | 372 | * @param array $list Array of files to append to |
373 | - * @param mixed $extensions Array of extensions to allow, null for all. Use a dot: array('.php'). |
|
373 | + * @param string[] $extensions Array of extensions to allow, null for all. Use a dot: array('.php'). |
|
374 | 374 | * |
375 | 375 | * @return array Filenames in $directory, in the form $directory/filename. |
376 | 376 | */ |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | /** |
439 | 439 | * Display a system message on next page load. |
440 | 440 | * |
441 | - * @param string|array $message Message or messages to add |
|
441 | + * @param string $message Message or messages to add |
|
442 | 442 | * |
443 | 443 | * @return bool |
444 | 444 | */ |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * @param string $object_type The object type |
636 | 636 | * @param string $object The object involved in the event |
637 | 637 | * |
638 | - * @return true |
|
638 | + * @return boolean |
|
639 | 639 | * |
640 | 640 | * @see elgg_trigger_before_event |
641 | 641 | */ |
@@ -816,7 +816,7 @@ discard block |
||
816 | 816 | * @param string $hook Hook name |
817 | 817 | * @param string $type Hook type |
818 | 818 | * |
819 | - * @return array |
|
819 | + * @return callable[] |
|
820 | 820 | * |
821 | 821 | * @since 2.0.0 |
822 | 822 | */ |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | * @param string $event Event name |
831 | 831 | * @param string $type Object type |
832 | 832 | * |
833 | - * @return array |
|
833 | + * @return callable[] |
|
834 | 834 | * |
835 | 835 | * @since 2.0.0 |
836 | 836 | */ |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | * A {@elgg_plugin_hook debug log} is called. If a handler returns |
881 | 881 | * false, it will stop the default logging method. |
882 | 882 | * |
883 | - * @param mixed $value The value |
|
883 | + * @param string $value The value |
|
884 | 884 | * @param bool $to_screen Display to screen? |
885 | 885 | * @return void |
886 | 886 | * @since 1.7.0 |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | * Extract class names from an array with key "class", optionally merging into a preexisting set. |
1223 | 1223 | * |
1224 | 1224 | * @param array $array Source array |
1225 | - * @param string|string[] $existing Existing name(s) |
|
1225 | + * @param string[] $existing Existing name(s) |
|
1226 | 1226 | * @return string[] |
1227 | 1227 | * |
1228 | 1228 | * @since 2.3.0 |
@@ -1787,7 +1787,7 @@ discard block |
||
1787 | 1787 | * @param array $params empty |
1788 | 1788 | * |
1789 | 1789 | * @elgg_plugin_hook unit_tests system |
1790 | - * @return array |
|
1790 | + * @return string[] |
|
1791 | 1791 | * @access private |
1792 | 1792 | */ |
1793 | 1793 | function _elgg_api_test($hook, $type, $value, $params) { |
@@ -379,16 +379,16 @@ discard block |
||
379 | 379 | $directory = sanitise_filepath($directory); |
380 | 380 | if ($handle = opendir($directory)) { |
381 | 381 | while (($file = readdir($handle)) !== false) { |
382 | - if (!is_file($directory . $file) || in_array($file, $exceptions)) { |
|
382 | + if (!is_file($directory.$file) || in_array($file, $exceptions)) { |
|
383 | 383 | continue; |
384 | 384 | } |
385 | 385 | |
386 | 386 | if (is_array($extensions)) { |
387 | 387 | if (in_array(strrchr($file, '.'), $extensions)) { |
388 | - $list[] = $directory . $file; |
|
388 | + $list[] = $directory.$file; |
|
389 | 389 | } |
390 | 390 | } else { |
391 | - $list[] = $directory . $file; |
|
391 | + $list[] = $directory.$file; |
|
392 | 392 | } |
393 | 393 | } |
394 | 394 | closedir($handle); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $path = rtrim($path, " \n\t\0\x0B/"); |
419 | 419 | |
420 | 420 | if ($append_slash) { |
421 | - $path = $path . '/'; |
|
421 | + $path = $path.'/'; |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | return $path; |
@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | $query = isset($parts['query']) ? "?{$parts['query']}" : ''; |
952 | 952 | $fragment = isset($parts['fragment']) ? "#{$parts['fragment']}" : ''; |
953 | 953 | |
954 | - $string = $scheme . $host . $port . $path . $query . $fragment; |
|
954 | + $string = $scheme.$host.$port.$path.$query.$fragment; |
|
955 | 955 | |
956 | 956 | if ($html_encode) { |
957 | 957 | return htmlspecialchars($string, ENT_QUOTES, 'UTF-8', false); |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | */ |
1361 | 1361 | function _elgg_normalize_plural_options_array($options, $singulars) { |
1362 | 1362 | foreach ($singulars as $singular) { |
1363 | - $plural = $singular . 's'; |
|
1363 | + $plural = $singular.'s'; |
|
1364 | 1364 | |
1365 | 1365 | if (array_key_exists($singular, $options)) { |
1366 | 1366 | if ($options[$singular] === ELGG_ENTITIES_ANY_VALUE) { |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | // demoted to NOTICE from DEBUG so javascript is not corrupted |
1409 | 1409 | elgg_log("Page {$uri} generated in $time seconds", 'INFO'); |
1410 | 1410 | } catch (Exception $e) { |
1411 | - $message = 'Error: ' . get_class($e) . ' thrown within the shutdown handler. '; |
|
1411 | + $message = 'Error: '.get_class($e).' thrown within the shutdown handler. '; |
|
1412 | 1412 | $message .= "Message: '{$e->getMessage()}' in file {$e->getFile()} (line {$e->getLine()})"; |
1413 | 1413 | error_log($message); |
1414 | 1414 | error_log("Exception trace stack: {$e->getTraceAsString()}"); |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | $view = implode('/', array_slice($segments, 1)); |
1445 | 1445 | } else { |
1446 | 1446 | // form views start with "forms", not "form" |
1447 | - $view = 'forms/' . implode('/', array_slice($segments, 1)); |
|
1447 | + $view = 'forms/'.implode('/', array_slice($segments, 1)); |
|
1448 | 1448 | } |
1449 | 1449 | |
1450 | 1450 | $ajax_api = _elgg_services()->ajax; |
@@ -1510,7 +1510,7 @@ discard block |
||
1510 | 1510 | function _elgg_favicon_page_handler($segments) { |
1511 | 1511 | header("HTTP/1.1 404 Not Found", true, 404); |
1512 | 1512 | |
1513 | - header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', strtotime("+1 week")), true); |
|
1513 | + header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', strtotime("+1 week")), true); |
|
1514 | 1514 | header("Pragma: public", true); |
1515 | 1515 | header("Cache-Control: public", true); |
1516 | 1516 | |
@@ -1540,7 +1540,7 @@ discard block |
||
1540 | 1540 | $return = str_replace(' desc', ' asc', $order_by); |
1541 | 1541 | } else { |
1542 | 1542 | // no order specified, so default to desc since mysql defaults to asc |
1543 | - $return = $order_by . ' desc'; |
|
1543 | + $return = $order_by.' desc'; |
|
1544 | 1544 | } |
1545 | 1545 | |
1546 | 1546 | return $return; |
@@ -1791,10 +1791,10 @@ discard block |
||
1791 | 1791 | * @access private |
1792 | 1792 | */ |
1793 | 1793 | function _elgg_api_test($hook, $type, $value, $params) { |
1794 | - $value[] = Paths::elgg() . 'engine/tests/ElggTravisInstallTest.php'; |
|
1795 | - $value[] = Paths::elgg() . 'engine/tests/ElggCoreHelpersTest.php'; |
|
1796 | - $value[] = Paths::elgg() . 'engine/tests/ElggCoreRegressionBugsTest.php'; |
|
1797 | - $value[] = Paths::elgg() . 'engine/tests/ElggBatchTest.php'; |
|
1794 | + $value[] = Paths::elgg().'engine/tests/ElggTravisInstallTest.php'; |
|
1795 | + $value[] = Paths::elgg().'engine/tests/ElggCoreHelpersTest.php'; |
|
1796 | + $value[] = Paths::elgg().'engine/tests/ElggCoreRegressionBugsTest.php'; |
|
1797 | + $value[] = Paths::elgg().'engine/tests/ElggBatchTest.php'; |
|
1798 | 1798 | return $value; |
1799 | 1799 | } |
1800 | 1800 | |
@@ -1802,7 +1802,7 @@ discard block |
||
1802 | 1802 | * @see \Elgg\Application::loadCore Do not do work here. Just register for events. |
1803 | 1803 | */ |
1804 | 1804 | return function(\Elgg\EventsService $events, \Elgg\HooksRegistrationService $hooks) { |
1805 | - $events->registerHandler('cache:flush', 'system', function () { |
|
1805 | + $events->registerHandler('cache:flush', 'system', function() { |
|
1806 | 1806 | _elgg_services()->boot->invalidateCache(); |
1807 | 1807 | }); |
1808 | 1808 |