Completed
Push — master ( 7addf5...21d848 )
by Jáchym
12s queued 10s
created
src/TranslationLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,8 +95,8 @@
 block discarded – undo
95 95
 	{
96 96
 		foreach ($this->getLoaders() as $format => $loader) {
97 97
 			// load any existing translation files
98
-			$extension = $catalogue->getLocale() . '.' . $format;
99
-			foreach (Finder::findFiles('*.' . $extension)->from($directory) as $file) {
98
+			$extension = $catalogue->getLocale().'.'.$format;
99
+			foreach (Finder::findFiles('*.'.$extension)->from($directory) as $file) {
100 100
 				/** @var \SplFileInfo $file */
101 101
 				$domain = substr($file->getFileName(), 0, -1 * strlen($extension) - 1);
102 102
 				$this->loadResource($format, $file->getPathname(), $domain, $catalogue);
Please login to merge, or discard this patch.
src/LocaleResolver/AcceptHeaderResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@
 block discarded – undo
65 65
 			return NULL;
66 66
 		}
67 67
 
68
-		$s = strtolower($header);  // case insensitive
69
-		$s = strtr($s, '_', '-');  // cs_CZ means cs-CZ
70
-		rsort($langs);             // first more specific
71
-		preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches);
68
+		$s = strtolower($header); // case insensitive
69
+		$s = strtr($s, '_', '-'); // cs_CZ means cs-CZ
70
+		rsort($langs); // first more specific
71
+		preg_match_all('#('.implode('|', $langs).')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches);
72 72
 
73 73
 		if (!$matches[0]) {
74 74
 			return NULL;
Please login to merge, or discard this patch.
src/Translator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 		$tmp = [];
184 184
 		foreach ($parameters as $key => $val) {
185
-			$tmp['%' . trim($key, '%') . '%'] = $val;
185
+			$tmp['%'.trim($key, '%').'%'] = $val;
186 186
 		}
187 187
 		$parameters = $tmp;
188 188
 
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 	 */
515 515
 	public static function buildWhitelistRegexp($whitelist)
516 516
 	{
517
-		return ($whitelist !== NULL) ? '~^(' . implode('|', $whitelist) . ')~i' : NULL;
517
+		return ($whitelist !== NULL) ? '~^('.implode('|', $whitelist).')~i' : NULL;
518 518
 	}
519 519
 
520 520
 }
Please login to merge, or discard this patch.
src/Extractors/LatteExtractor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 			if ($token->name === '/_' || ($token->name === '_' && $token->closing === TRUE)) {
72 72
 				if ($buffer !== NULL) {
73
-					$catalogue->set(($this->prefix ? $this->prefix . '.' : '') . $buffer, $buffer);
73
+					$catalogue->set(($this->prefix ? $this->prefix.'.' : '').$buffer, $buffer);
74 74
 					$buffer = NULL;
75 75
 				}
76 76
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 					$message = substr(trim($message), 1, -1);
87 87
 				}
88 88
 
89
-				$catalogue->set(($this->prefix ? $this->prefix . '.' : '') . $message, $message);
89
+				$catalogue->set(($this->prefix ? $this->prefix.'.' : '').$message, $message);
90 90
 			}
91 91
 		}
92 92
 	}
Please login to merge, or discard this patch.
src/CatalogueFactory.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@
 block discarded – undo
50 50
 
51 51
 	/**
52 52
 	 * {@inheritdoc}
53
+	 * @param string $format
54
+	 * @param string $resource
55
+	 * @param string $locale
53 56
 	 */
54 57
 	public function addResource($format, $resource, $locale, $domain = 'messages')
55 58
 	{
Please login to merge, or discard this patch.
src/LocaleResolver/SessionResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	{
79 79
 		if (!$this->session->isStarted() && $this->httpResponse->isSent()) {
80 80
 			trigger_error(
81
-				'The advice of session locale resolver is required but the session has not been started and headers had been already sent. ' .
81
+				'The advice of session locale resolver is required but the session has not been started and headers had been already sent. '.
82 82
 				'Either start your sessions earlier or disabled the SessionResolver.',
83 83
 				E_USER_WARNING
84 84
 			);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			return NULL;
90 90
 		}
91 91
 
92
-		$short = array_map(function ($locale) {
92
+		$short = array_map(function($locale) {
93 93
 			return substr($locale, 0, 2);
94 94
 		}, $translator->getAvailableLocales());
95 95
 
Please login to merge, or discard this patch.
src/Latte/TranslateMacros.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 				$value = var_export($node->content, TRUE);
45 45
 				$node->content = '';
46 46
 			} else {
47
-				$node->openingCode = '<?php ob_start(function () {}) ?>' . $node->openingCode;
47
+				$node->openingCode = '<?php ob_start(function () {}) ?>'.$node->openingCode;
48 48
 				$value = 'ob_get_clean()';
49 49
 			}
50 50
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 				throw new \Latte\CompileException('Expected message prefix, none given');
80 80
 			}
81 81
 
82
-			return $writer->write('$_translator = ' . PrefixedTranslator::class . '::register($this, %node.word);');
82
+			return $writer->write('$_translator = '.PrefixedTranslator::class.'::register($this, %node.word);');
83 83
 		}
84 84
 	}
85 85
 
Please login to merge, or discard this patch.
src/Caching/PhpFileStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@
 block discarded – undo
47 47
 	{
48 48
 		$cacheKey = substr_replace(
49 49
 			$key,
50
-			trim(strtr($this->hint, '\\/@', '.._'), '.') . '-',
50
+			trim(strtr($this->hint, '\\/@', '.._'), '.').'-',
51 51
 			strpos($key, Cache::NAMESPACE_SEPARATOR) + 1,
52 52
 			0
53 53
 		);
54 54
 
55
-		return parent::getCacheFile($cacheKey) . '.php';
55
+		return parent::getCacheFile($cacheKey).'.php';
56 56
 	}
57 57
 
58 58
 }
Please login to merge, or discard this patch.
src/CatalogueCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 EOF
151 151
 			, $locale, $availableCatalogues[$locale]->all(), new PhpLiteral($fallbackContent));
152 152
 
153
-		return '<?php' . "\n\n" . $content;
153
+		return '<?php'."\n\n".$content;
154 154
 	}
155 155
 
156 156
 	/**
Please login to merge, or discard this patch.