Completed
Pull Request — master (#146)
by
unknown
10:18
created
src/DI/TranslationExtension.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -379,32 +379,32 @@
 block discarded – undo
379 379
 		}, array_keys($this->loaders));
380 380
 
381 381
 		foreach ($dirs as $baseDomain => $dir) {
382
-                        foreach (Finder::findFiles($mask)->from($dir) as $file) {
383
-                                /* @var $file \SplFileInfo */
384
-                                if (!preg_match('~^(?P<domain>.*?)\.(?P<locale>[^\.]+)\.(?P<format>[^\.]+)$~', $file->getFilename(), $m)) {
385
-                                        continue;
386
-                                }
387
-
388
-                                $relativePath = str_replace($dir, '', $file->getPath());
389
-                                if($relativePath !== '') {
390
-                                    $foldersDomain = str_replace(DIRECTORY_SEPARATOR, '.', $relativePath);
391
-                                    $foldersDomain = ltrim($foldersDomain, '.');
392
-                                    $m['domain'] = "$foldersDomain.{$m['domain']}";
393
-                                }
394
-
395
-                                if (is_string($baseDomain)) {
396
-                                    $m['domain'] = "$baseDomain.{$m['domain']}";
397
-                                }
398
-
399
-                                if ($whitelistRegexp && !preg_match($whitelistRegexp, $m['locale']) && $builder->parameters['productionMode']) {
400
-                                        continue; // ignore in production mode, there is no need to pass the ignored resources
401
-                                }
402
-
403
-                                $this->validateResource($m['format'], $file->getPathname(), $m['locale'], $m['domain']);
404
-                                $translator->addSetup('addResource', [$m['format'], $file->getPathname(), $m['locale'], $m['domain']]);
405
-                                $builder->addDependency($file->getPathname());
406
-                        }
407
-                }
382
+						foreach (Finder::findFiles($mask)->from($dir) as $file) {
383
+								/* @var $file \SplFileInfo */
384
+								if (!preg_match('~^(?P<domain>.*?)\.(?P<locale>[^\.]+)\.(?P<format>[^\.]+)$~', $file->getFilename(), $m)) {
385
+										continue;
386
+								}
387
+
388
+								$relativePath = str_replace($dir, '', $file->getPath());
389
+								if($relativePath !== '') {
390
+									$foldersDomain = str_replace(DIRECTORY_SEPARATOR, '.', $relativePath);
391
+									$foldersDomain = ltrim($foldersDomain, '.');
392
+									$m['domain'] = "$foldersDomain.{$m['domain']}";
393
+								}
394
+
395
+								if (is_string($baseDomain)) {
396
+									$m['domain'] = "$baseDomain.{$m['domain']}";
397
+								}
398
+
399
+								if ($whitelistRegexp && !preg_match($whitelistRegexp, $m['locale']) && $builder->parameters['productionMode']) {
400
+										continue; // ignore in production mode, there is no need to pass the ignored resources
401
+								}
402
+
403
+								$this->validateResource($m['format'], $file->getPathname(), $m['locale'], $m['domain']);
404
+								$translator->addSetup('addResource', [$m['format'], $file->getPathname(), $m['locale'], $m['domain']]);
405
+								$builder->addDependency($file->getPathname());
406
+						}
407
+				}
408 408
 	}
409 409
 
410 410
 	/**
Please login to merge, or discard this patch.