Completed
Pull Request — master (#29)
by Samuel
07:21
created
src/TokenModifier/FilePathToKeyTokenModifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
 
20 20
     public function modifyAll(TokenCollection $tokenCollection): TokenCollection
21 21
     {
22
-        $pathParts = array_unique(explode('/', str_replace($this->basePath . '/', '', pathinfo($tokenCollection->getFilePath(), PATHINFO_DIRNAME) . '/' . pathinfo($tokenCollection->getFilePath(), PATHINFO_FILENAME))));
22
+        $pathParts = array_unique(explode('/', str_replace($this->basePath.'/', '', pathinfo($tokenCollection->getFilePath(), PATHINFO_DIRNAME).'/'.pathinfo($tokenCollection->getFilePath(), PATHINFO_FILENAME))));
23 23
         foreach ($tokenCollection->getTokens() as $token) {
24
-            $newKeyParts = array_filter(array_map([$this, 'toUnderscore'], $pathParts), function ($pathPart) {
24
+            $newKeyParts = array_filter(array_map([$this, 'toUnderscore'], $pathParts), function($pathPart) {
25 25
                 return !in_array($pathPart, $this->excludeDirectoryNames);
26 26
             });
27 27
             $newKeyParts[] = $token->getTranslationKey();
Please login to merge, or discard this patch.
src/TokenModifier/VariableNameModifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         preg_match('#\$(.*?)=#', $token->getOriginalBlock(), $matches);
13 13
         if (!isset($matches[1])) {
14
-            throw new Exception('Cannot find variable name in ' . $token->getOriginalBlock());
14
+            throw new Exception('Cannot find variable name in '.$token->getOriginalBlock());
15 15
         }
16 16
         $token->changeTranslationKey(trim($matches[1]));
17 17
         return $token;
Please login to merge, or discard this patch.