Browse Source

[OutputEscaper] fixed coding standards: opening brace should be on a new line

Pascal Borreli 15 years ago
parent
commit
33fb7a5ac2
1 changed files with 12 additions and 3 deletions
  1. 12 3
      src/Symfony/Components/OutputEscaper/Escaper.php

+ 12 - 3
src/Symfony/Components/OutputEscaper/Escaper.php

@@ -348,7 +348,10 @@ abstract class Escaper
          * @param string $value the value to escape
          * @return string the escaped value
          */
-        function ($value) { return $value; },
+        function ($value)
+        {
+          return $value;
+        },
 
       'js' =>
         /**
@@ -363,7 +366,10 @@ abstract class Escaper
          * @param string $value the value to escape
          * @return string the escaped value
          */
-        function ($value) { return str_replace(array("\\"  , "\n"  , "\r" , "\""  , "'"  ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), (is_string($value) ? htmlentities($value, ENT_QUOTES, Escaper::getCharset()) : $value)); },
+        function ($value)
+        {
+          return str_replace(array("\\"  , "\n"  , "\r" , "\""  , "'"  ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), (is_string($value) ? htmlentities($value, ENT_QUOTES, Escaper::getCharset()) : $value));
+        },
 
       'js_no_entities' =>
         /**
@@ -373,7 +379,10 @@ abstract class Escaper
          * @param string $value the value to escape
          * @return string the escaped value
          */
-        function ($value) { return str_replace(array("\\"  , "\n"  , "\r" , "\""  , "'"  ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), $value); },
+        function ($value)
+        {
+          return str_replace(array("\\"  , "\n"  , "\r" , "\""  , "'"  ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), $value);
+        },
     );
   }
 }