mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
[ticket/13838] Fix coding style
PHPBB3-13838
This commit is contained in:
parent
e4b30c474b
commit
62e13e945c
8 changed files with 22 additions and 11 deletions
|
@ -12,7 +12,7 @@
|
||||||
<!-- Tabs MUST be used for indentation -->
|
<!-- Tabs MUST be used for indentation -->
|
||||||
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
|
<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" />
|
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningBraceBsdAllmanSniff.php" />
|
||||||
|
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
|
@ -514,7 +514,8 @@ class acp_board
|
||||||
|
|
||||||
if ($config_name == 'guest_style')
|
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]);
|
$this->guest_style_set($cfg_array[$config_name]);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -117,7 +117,8 @@ class token_storage implements TokenStorageInterface
|
||||||
{
|
{
|
||||||
$service = $this->get_service_name_for_db($service);
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
if ($this->cachedToken) {
|
if ($this->cachedToken)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +233,8 @@ class token_storage implements TokenStorageInterface
|
||||||
{
|
{
|
||||||
$service = $this->get_service_name_for_db($service);
|
$service = $this->get_service_name_for_db($service);
|
||||||
|
|
||||||
if ($this->cachedToken instanceof TokenInterface) {
|
if ($this->cachedToken instanceof TokenInterface)
|
||||||
|
{
|
||||||
return $this->cachedToken;
|
return $this->cachedToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,8 @@ class loader extends \Twig_Loader_Filesystem
|
||||||
|
|
||||||
// If this is in the cache we can skip the entire process below
|
// If this is in the cache we can skip the entire process below
|
||||||
// as it should have already been validated
|
// as it should have already been validated
|
||||||
if (isset($this->cache[$name])) {
|
if (isset($this->cache[$name]))
|
||||||
|
{
|
||||||
return $this->cache[$name];
|
return $this->cache[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,8 @@ class definenode extends \Twig_Node
|
||||||
{
|
{
|
||||||
$compiler->addDebugInfo($this);
|
$compiler->addDebugInfo($this);
|
||||||
|
|
||||||
if ($this->getAttribute('capture')) {
|
if ($this->getAttribute('capture'))
|
||||||
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->write("ob_start();\n")
|
->write("ob_start();\n")
|
||||||
->subcompile($this->getNode('value'))
|
->subcompile($this->getNode('value'))
|
||||||
|
|
|
@ -47,7 +47,8 @@ class includephp extends \Twig_Node
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getAttribute('ignore_missing')) {
|
if ($this->getAttribute('ignore_missing'))
|
||||||
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->write("try {\n")
|
->write("try {\n")
|
||||||
->indent()
|
->indent()
|
||||||
|
@ -76,7 +77,8 @@ class includephp extends \Twig_Node
|
||||||
->write("}\n")
|
->write("}\n")
|
||||||
;
|
;
|
||||||
|
|
||||||
if ($this->getAttribute('ignore_missing')) {
|
if ($this->getAttribute('ignore_missing'))
|
||||||
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->outdent()
|
->outdent()
|
||||||
->write("} catch (\Twig_Error_Loader \$e) {\n")
|
->write("} catch (\Twig_Error_Loader \$e) {\n")
|
||||||
|
|
|
@ -33,7 +33,8 @@ class defineparser extends \Twig_TokenParser
|
||||||
$name = $this->parser->getExpressionParser()->parseExpression();
|
$name = $this->parser->getExpressionParser()->parseExpression();
|
||||||
|
|
||||||
$capture = false;
|
$capture = false;
|
||||||
if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) {
|
if ($stream->test(\Twig_Token::OPERATOR_TYPE, '='))
|
||||||
|
{
|
||||||
$stream->next();
|
$stream->next();
|
||||||
$value = $this->parser->getExpressionParser()->parseExpression();
|
$value = $this->parser->getExpressionParser()->parseExpression();
|
||||||
|
|
||||||
|
@ -45,7 +46,9 @@ class defineparser extends \Twig_TokenParser
|
||||||
}
|
}
|
||||||
|
|
||||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$capture = true;
|
$capture = true;
|
||||||
|
|
||||||
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
|
||||||
|
|
|
@ -31,7 +31,8 @@ class includephp extends \Twig_TokenParser
|
||||||
$stream = $this->parser->getStream();
|
$stream = $this->parser->getStream();
|
||||||
|
|
||||||
$ignoreMissing = false;
|
$ignoreMissing = false;
|
||||||
if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) {
|
if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore'))
|
||||||
|
{
|
||||||
$stream->next();
|
$stream->next();
|
||||||
$stream->expect(\Twig_Token::NAME_TYPE, 'missing');
|
$stream->expect(\Twig_Token::NAME_TYPE, 'missing');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue