aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicofuma <github@nicofuma.fr>2015-05-14 13:32:25 +0200
committerNicofuma <github@nicofuma.fr>2015-05-14 15:43:44 +0200
commit62e13e945c475c416c4fb9deff8f234d3508a598 (patch)
tree63054db38f4be26feae3992693a3c65ba81b22df
parente4b30c474ba24d8bc023f5bf07b46de6ccfaee89 (diff)
downloadforums-62e13e945c475c416c4fb9deff8f234d3508a598.tar
forums-62e13e945c475c416c4fb9deff8f234d3508a598.tar.gz
forums-62e13e945c475c416c4fb9deff8f234d3508a598.tar.bz2
forums-62e13e945c475c416c4fb9deff8f234d3508a598.tar.xz
forums-62e13e945c475c416c4fb9deff8f234d3508a598.zip
[ticket/13838] Fix coding style
PHPBB3-13838
-rw-r--r--build/code_sniffer/ruleset-minimum.xml2
-rw-r--r--phpBB/includes/acp/acp_board.php3
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php6
-rw-r--r--phpBB/phpbb/template/twig/loader.php3
-rw-r--r--phpBB/phpbb/template/twig/node/definenode.php3
-rw-r--r--phpBB/phpbb/template/twig/node/includephp.php6
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/defineparser.php7
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php3
8 files changed, 22 insertions, 11 deletions
diff --git a/build/code_sniffer/ruleset-minimum.xml b/build/code_sniffer/ruleset-minimum.xml
index 920f908c9d..13f122cae7 100644
--- a/build/code_sniffer/ruleset-minimum.xml
+++ b/build/code_sniffer/ruleset-minimum.xml
@@ -12,7 +12,7 @@
<!-- Tabs MUST be used for indentation -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
- <!-- There MUST NOT be unused use statements. -->
+ <!-- ALL braces MUST be on their own lines. -->
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningBraceBsdAllmanSniff.php" />
</ruleset>
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 63e2647f02..a41a53226f 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -514,7 +514,8 @@ class acp_board
if ($config_name == 'guest_style')
{
- if (isset($cfg_array[$config_name])) {
+ if (isset($cfg_array[$config_name]))
+ {
$this->guest_style_set($cfg_array[$config_name]);
}
continue;
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index 023cf402ca..f488c2022d 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -117,7 +117,8 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken) {
+ if ($this->cachedToken)
+ {
return true;
}
@@ -232,7 +233,8 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken instanceof TokenInterface) {
+ if ($this->cachedToken instanceof TokenInterface)
+ {
return $this->cachedToken;
}
diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php
index 2f8ffaa776..139a413b70 100644
--- a/phpBB/phpbb/template/twig/loader.php
+++ b/phpBB/phpbb/template/twig/loader.php
@@ -97,7 +97,8 @@ class loader extends \Twig_Loader_Filesystem
// If this is in the cache we can skip the entire process below
// as it should have already been validated
- if (isset($this->cache[$name])) {
+ if (isset($this->cache[$name]))
+ {
return $this->cache[$name];
}
diff --git a/phpBB/phpbb/template/twig/node/definenode.php b/phpBB/phpbb/template/twig/node/definenode.php
index 695ec4281f..c110785c4b 100644
--- a/phpBB/phpbb/template/twig/node/definenode.php
+++ b/phpBB/phpbb/template/twig/node/definenode.php
@@ -31,7 +31,8 @@ class definenode extends \Twig_Node
{
$compiler->addDebugInfo($this);
- if ($this->getAttribute('capture')) {
+ if ($this->getAttribute('capture'))
+ {
$compiler
->write("ob_start();\n")
->subcompile($this->getNode('value'))
diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php
index 826617e8e8..659495fd9e 100644
--- a/phpBB/phpbb/template/twig/node/includephp.php
+++ b/phpBB/phpbb/template/twig/node/includephp.php
@@ -47,7 +47,8 @@ class includephp extends \Twig_Node
return;
}
- if ($this->getAttribute('ignore_missing')) {
+ if ($this->getAttribute('ignore_missing'))
+ {
$compiler
->write("try {\n")
->indent()
@@ -76,7 +77,8 @@ class includephp extends \Twig_Node
->write("}\n")
;
- if ($this->getAttribute('ignore_missing')) {
+ if ($this->getAttribute('ignore_missing'))
+ {
$compiler
->outdent()
->write("} catch (\Twig_Error_Loader \$e) {\n")
diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
index cfee84a363..2b88d61118 100644
--- a/phpBB/phpbb/template/twig/tokenparser/defineparser.php
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -33,7 +33,8 @@ class defineparser extends \Twig_TokenParser
$name = $this->parser->getExpressionParser()->parseExpression();
$capture = false;
- if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) {
+ if ($stream->test(\Twig_Token::OPERATOR_TYPE, '='))
+ {
$stream->next();
$value = $this->parser->getExpressionParser()->parseExpression();
@@ -45,7 +46,9 @@ class defineparser extends \Twig_TokenParser
}
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
- } else {
+ }
+ else
+ {
$capture = true;
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
index 38196c5290..c09f7729b0 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includephp.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -31,7 +31,8 @@ class includephp extends \Twig_TokenParser
$stream = $this->parser->getStream();
$ignoreMissing = false;
- if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) {
+ if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore'))
+ {
$stream->next();
$stream->expect(\Twig_Token::NAME_TYPE, 'missing');