Completed
Pull Request — develop (#1588)
by
unknown
48:11 queued 28:09
created
vendor/gettext/gettext/src/Extractors/Twig.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 /**
12 12
  * Class to get gettext strings from twig files returning arrays.
13 13
  */
14
-class Twig extends Extractor implements ExtractorInterface
15
-{
14
+class Twig extends Extractor implements ExtractorInterface {
16 15
     public static $options = [
17 16
         'extractComments' => 'notes:',
18 17
         'twig' => null,
@@ -21,8 +20,7 @@  discard block
 block discarded – undo
21 20
     /**
22 21
      * {@inheritdoc}
23 22
      */
24
-    public static function fromString($string, Translations $translations, array $options = [])
25
-    {
23
+    public static function fromString($string, Translations $translations, array $options = []) {
26 24
         $options += static::$options;
27 25
 
28 26
         $twig = $options['twig'] ?: static::createTwig();
@@ -35,8 +33,7 @@  discard block
 block discarded – undo
35 33
      *
36 34
      * @return Twig_Environment
37 35
      */
38
-    protected static function createTwig()
39
-    {
36
+    protected static function createTwig() {
40 37
         $twig = new Twig_Environment(new Twig_Loader_Array(['' => '']));
41 38
         $twig->addExtension(new Twig_Extensions_Extension_I18n());
42 39
 
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/Blade.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,13 +9,11 @@
 block discarded – undo
9 9
 /**
10 10
  * Class to get gettext strings from blade.php files returning arrays.
11 11
  */
12
-class Blade extends Extractor implements ExtractorInterface
13
-{
12
+class Blade extends Extractor implements ExtractorInterface {
14 13
     /**
15 14
      * {@inheritdoc}
16 15
      */
17
-    public static function fromString($string, Translations $translations, array $options = [])
18
-    {
16
+    public static function fromString($string, Translations $translations, array $options = []) {
19 17
         if (empty($options['facade'])) {
20 18
             $cachePath = empty($options['cachePath']) ? sys_get_temp_dir() : $options['cachePath'];
21 19
             $bladeCompiler = new BladeCompiler(new Filesystem(), $cachePath);
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/ExtractorInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Gettext\Translations;
6 6
 
7
-interface ExtractorInterface
8
-{
7
+interface ExtractorInterface {
9 8
     /**
10 9
      * Extract the translations from a file.
11 10
      *
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/Csv.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
 /**
10 10
  * Class to get gettext strings from csv.
11 11
  */
12
-class Csv extends Extractor implements ExtractorInterface
13
-{
12
+class Csv extends Extractor implements ExtractorInterface {
14 13
     use HeadersExtractorTrait;
15 14
     use CsvTrait;
16 15
 
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
     /**
24 23
      * {@inheritdoc}
25 24
      */
26
-    public static function fromString($string, Translations $translations, array $options = [])
27
-    {
25
+    public static function fromString($string, Translations $translations, array $options = []) {
28 26
         $options += static::$options;
29 27
         $handle = fopen('php://memory', 'w');
30 28
 
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/PhpCode.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@  discard block
 block discarded – undo
48 48
      * {@inheritdoc}
49 49
      * @throws Exception
50 50
      */
51
-    public static function fromString($string, Translations $translations, array $options = [])
52
-    {
51
+    public static function fromString($string, Translations $translations, array $options = []) {
53 52
         static::fromStringMultiple($string, [$translations], $options);
54 53
     }
55 54
 
@@ -57,8 +56,7 @@  discard block
 block discarded – undo
57 56
      * @inheritDoc
58 57
      * @throws Exception
59 58
      */
60
-    public static function fromStringMultiple($string, array $translations, array $options = [])
61
-    {
59
+    public static function fromStringMultiple($string, array $translations, array $options = []) {
62 60
         $options += static::$options;
63 61
 
64 62
         /** @var FunctionsScanner $functions */
@@ -74,8 +72,7 @@  discard block
 block discarded – undo
74 72
     /**
75 73
      * @inheritDoc
76 74
      */
77
-    public static function fromFileMultiple($file, array $translations, array $options = [])
78
-    {
75
+    public static function fromFileMultiple($file, array $translations, array $options = []) {
79 76
         foreach (static::getFiles($file) as $file) {
80 77
             $options['file'] = $file;
81 78
             static::fromStringMultiple(static::readFile($file), $translations, $options);
@@ -90,8 +87,7 @@  discard block
 block discarded – undo
90 87
      *
91 88
      * @return string
92 89
      */
93
-    public static function convertString($value)
94
-    {
90
+    public static function convertString($value) {
95 91
         if (strpos($value, '\\') === false) {
96 92
             return substr($value, 1, -1);
97 93
         }
@@ -141,8 +137,7 @@  discard block
 block discarded – undo
141 137
      * @return string|null
142 138
      * @see http://php.net/manual/en/function.chr.php#118804
143 139
      */
144
-    protected static function unicodeChar($dec)
145
-    {
140
+    protected static function unicodeChar($dec) {
146 141
         if ($dec < 0x80) {
147 142
             return chr($dec);
148 143
         }
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/JsonDictionary.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,15 +8,13 @@
 block discarded – undo
8 8
 /**
9 9
  * Class to get gettext strings from plain json.
10 10
  */
11
-class JsonDictionary extends Extractor implements ExtractorInterface
12
-{
11
+class JsonDictionary extends Extractor implements ExtractorInterface {
13 12
     use DictionaryTrait;
14 13
 
15 14
     /**
16 15
      * {@inheritdoc}
17 16
      */
18
-    public static function fromString($string, Translations $translations, array $options = [])
19
-    {
17
+    public static function fromString($string, Translations $translations, array $options = []) {
20 18
         $messages = json_decode($string, true);
21 19
 
22 20
         if (is_array($messages)) {
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/Mo.php 1 patch
Braces   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
 /**
10 10
  * Class to get gettext strings from .mo files.
11 11
  */
12
-class Mo extends Extractor implements ExtractorInterface
13
-{
12
+class Mo extends Extractor implements ExtractorInterface {
14 13
     const MAGIC1 = -1794895138;
15 14
     const MAGIC2 = -569244523;
16 15
     const MAGIC3 = 2500072158;
@@ -20,13 +19,13 @@  discard block
 block discarded – undo
20 19
     /**
21 20
      * {@inheritdoc}
22 21
      */
23
-    public static function fromString($string, Translations $translations, array $options = [])
24
-    {
22
+    public static function fromString($string, Translations $translations, array $options = []) {
25 23
         /** @var StringReader $stream */
26 24
         $stream = new static::$stringReaderClass($string);
27 25
         $magic = static::readInt($stream, 'V');
28 26
 
29
-        if (($magic === static::MAGIC1) || ($magic === static::MAGIC3)) { //to make sure it works for 64-bit platforms
27
+        if (($magic === static::MAGIC1) || ($magic === static::MAGIC3)) {
28
+//to make sure it works for 64-bit platforms
30 29
             $byteOrder = 'V'; //low endian
31 30
         } elseif ($magic === (static::MAGIC2 & 0xFFFFFFFF)) {
32 31
             $byteOrder = 'N'; //big endian
@@ -108,8 +107,7 @@  discard block
 block discarded – undo
108 107
      * @param StringReader $stream
109 108
      * @param string       $byteOrder
110 109
      */
111
-    protected static function readInt(StringReader $stream, $byteOrder)
112
-    {
110
+    protected static function readInt(StringReader $stream, $byteOrder) {
113 111
         if (($read = $stream->read(4)) === false) {
114 112
             return false;
115 113
         }
@@ -124,8 +122,7 @@  discard block
 block discarded – undo
124 122
      * @param string       $byteOrder
125 123
      * @param int          $count
126 124
      */
127
-    protected static function readIntArray(StringReader $stream, $byteOrder, $count)
128
-    {
125
+    protected static function readIntArray(StringReader $stream, $byteOrder, $count) {
129 126
         return unpack($byteOrder.$count, $stream->read(4 * $count));
130 127
     }
131 128
 }
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/Jed.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,13 +7,11 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * Class to get gettext strings from json files.
9 9
  */
10
-class Jed extends Extractor implements ExtractorInterface
11
-{
10
+class Jed extends Extractor implements ExtractorInterface {
12 11
     /**
13 12
      * {@inheritdoc}
14 13
      */
15
-    public static function fromString($string, Translations $translations, array $options = [])
16
-    {
14
+    public static function fromString($string, Translations $translations, array $options = []) {
17 15
         static::extract(json_decode($string, true), $translations);
18 16
     }
19 17
 
@@ -23,8 +21,7 @@  discard block
 block discarded – undo
23 21
      * @param array        $content
24 22
      * @param Translations $translations
25 23
      */
26
-    public static function extract(array $content, Translations $translations)
27
-    {
24
+    public static function extract(array $content, Translations $translations) {
28 25
         $messages = current($content);
29 26
         $headers = isset($messages['']) ? $messages[''] : null;
30 27
         unset($messages['']);
Please login to merge, or discard this patch.
vendor/gettext/gettext/src/Extractors/Po.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
 /**
10 10
  * Class to get gettext strings from php files returning arrays.
11 11
  */
12
-class Po extends Extractor implements ExtractorInterface
13
-{
12
+class Po extends Extractor implements ExtractorInterface {
14 13
     use HeadersExtractorTrait;
15 14
 
16 15
     /**
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
      *
19 18
      * {@inheritdoc}
20 19
      */
21
-    public static function fromString($string, Translations $translations, array $options = [])
22
-    {
20
+    public static function fromString($string, Translations $translations, array $options = []) {
23 21
         $lines = explode("\n", $string);
24 22
         $i = 0;
25 23
 
@@ -159,8 +157,7 @@  discard block
 block discarded – undo
159 157
      *
160 158
      * @return string
161 159
      */
162
-    protected static function fixMultiLines($line, array $lines, &$i)
163
-    {
160
+    protected static function fixMultiLines($line, array $lines, &$i) {
164 161
         for ($j = $i, $t = count($lines); $j < $t; ++$j) {
165 162
             if (substr($line, -1, 1) == '"' && isset($lines[$j + 1])) {
166 163
                 $nextLine = trim($lines[$j + 1]);
@@ -187,8 +184,7 @@  discard block
 block discarded – undo
187 184
      *
188 185
      * @return string
189 186
      */
190
-    public static function convertString($value)
191
-    {
187
+    public static function convertString($value) {
192 188
         if (!$value) {
193 189
             return '';
194 190
         }
Please login to merge, or discard this patch.