From 21c9b0eeae4252291af5c5b1ffd03fdb68e238b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Sun, 25 Jun 2017 22:18:47 +0200 Subject: [PATCH] [ticket/15253] Fix coding style PHPBB3-15253 --- phpBB/phpbb/storage/adapter/local.php | 18 +++++++++--------- tests/storage/adapter/local_test.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index 52597f9bca..4673dbca6e 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -34,11 +34,11 @@ class local implements adapter_interface public function __construct(\phpbb\config\config $config, \phpbb\filesystem\filesystem $filesystem, $phpbb_root_path, $path_key) { $this->filesystem = $filesystem; - $this->root_path = $phpbb_root_path.$config[$path_key]; + $this->root_path = $phpbb_root_path . $config[$path_key]; if (substr($this->root_path, -1, 1) != DIRECTORY_SEPARATOR) { - $this->root_path = $this->root_path.DIRECTORY_SEPARATOR; + $this->root_path = $this->root_path . DIRECTORY_SEPARATOR; } } @@ -54,7 +54,7 @@ class local implements adapter_interface try { - $this->filesystem->dump_file($this->root_path.$path, $content); + $this->filesystem->dump_file($this->root_path . $path, $content); } catch (filesystem_exception $e) { @@ -72,7 +72,7 @@ class local implements adapter_interface throw new exception('', $path); // FILE_DONT_EXIST } - if (($content = @file_get_contents($this->root_path.$path)) === false) + if (($content = @file_get_contents($this->root_path . $path)) === false) { throw new exception('', $path); // CANNOT READ FILE } @@ -85,7 +85,7 @@ class local implements adapter_interface */ public function exists($path) { - return $this->filesystem->exists($this->root_path.$path); + return $this->filesystem->exists($this->root_path . $path); } /** @@ -95,7 +95,7 @@ class local implements adapter_interface { try { - $this->filesystem->remove($this->root_path.$path); + $this->filesystem->remove($this->root_path . $path); } catch (filesystem_exception $e) { @@ -110,7 +110,7 @@ class local implements adapter_interface { try { - $this->filesystem->rename($this->root_path.$path_orig, $this->root_path.$path_dest, false); + $this->filesystem->rename($this->root_path . $path_orig, $this->root_path . $path_dest, false); } catch (filesystem_exception $e) { @@ -125,7 +125,7 @@ class local implements adapter_interface { try { - $this->filesystem->copy($this->root_path.$path_orig, $this->root_path.$path_dest, false); + $this->filesystem->copy($this->root_path . $path_orig, $this->root_path . $path_dest, false); } catch (filesystem_exception $e) { @@ -140,7 +140,7 @@ class local implements adapter_interface { try { - $this->filesystem->mkdir($this->root_path.$path); + $this->filesystem->mkdir($this->root_path . $path); } catch (filesystem_exception $e) { diff --git a/tests/storage/adapter/local_test.php b/tests/storage/adapter/local_test.php index 0ae62a85a1..bed30aa77f 100644 --- a/tests/storage/adapter/local_test.php +++ b/tests/storage/adapter/local_test.php @@ -23,7 +23,7 @@ 'test_path' => '.', )); $filesystem = new \phpbb\filesystem\filesystem(); - $phpbb_root_path = getcwd().DIRECTORY_SEPARATOR; + $phpbb_root_path = getcwd() . DIRECTORY_SEPARATOR; $path_key = 'test_path'; $this->adapter = new \phpbb\storage\adapter\local($config, $filesystem, $phpbb_root_path, $path_key); }