@@ -117,7 +117,7 @@ |
||
117 | 117 | public function getId() |
118 | 118 | { |
119 | 119 | if (!$this->id) { |
120 | - $this->setId(sha1($this->getDomain() . $this->getKey())); |
|
120 | + $this->setId(sha1($this->getDomain().$this->getKey())); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | return $this->id; |
@@ -205,7 +205,7 @@ |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
208 | - * @param Message[]|Collection $messages |
|
208 | + * @param Collection $messages |
|
209 | 209 | */ |
210 | 210 | public function setMessages(Collection $messages = null) |
211 | 211 | { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $configuration = new Configuration(); |
33 | 33 | $config = $this->processConfiguration($configuration, $configs); |
34 | 34 | |
35 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
35 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
36 | 36 | $loader->load('services.yml'); |
37 | 37 | $loader->load('filters_container.yml'); |
38 | 38 |
@@ -156,9 +156,8 @@ discard block |
||
156 | 156 | public function importBundlesTranslationFiles($bundles, $isBundle = false) |
157 | 157 | { |
158 | 158 | foreach ($bundles as $bundle) { |
159 | - $dir = $isBundle? |
|
160 | - dir($bundle->getPath())->path : |
|
161 | - dirname((new \ReflectionClass($bundle))->getFileName()); |
|
159 | + $dir = $isBundle ? |
|
160 | + dir($bundle->getPath())->path : dirname((new \ReflectionClass($bundle))->getFileName()); |
|
162 | 161 | |
163 | 162 | $this->importDirTranslationFiles($dir); |
164 | 163 | } |
@@ -176,12 +175,12 @@ discard block |
||
176 | 175 | $finder = null; |
177 | 176 | |
178 | 177 | if (preg_match('#^win#i', PHP_OS)) { |
179 | - $path = preg_replace('#' . preg_quote(DIRECTORY_SEPARATOR, '#') . '#', '/', $path); |
|
178 | + $path = preg_replace('#'.preg_quote(DIRECTORY_SEPARATOR, '#').'#', '/', $path); |
|
180 | 179 | } else { |
181 | 180 | $path = str_replace('\\', '/', $path); |
182 | 181 | } |
183 | 182 | |
184 | - $dir = $path . '/Resources/translations'; |
|
183 | + $dir = $path.'/Resources/translations'; |
|
185 | 184 | |
186 | 185 | if (is_dir($dir)) { |
187 | 186 | $finder = new Finder(); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | foreach ($content as $key => $value) { |
124 | - $method = 'set' . ucfirst($key); |
|
124 | + $method = 'set'.ucfirst($key); |
|
125 | 125 | |
126 | 126 | if (!method_exists($document, $method)) { |
127 | 127 | throw new \LogicException('Illegal variable provided for translation'); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * @param string $id |
54 | 54 | * |
55 | - * @return Translation|object |
|
55 | + * @return null|\ReflectionClass |
|
56 | 56 | */ |
57 | 57 | public function get($id) |
58 | 58 | { |
@@ -130,7 +130,7 @@ |
||
130 | 130 | foreach ($messages as $key => $message) { |
131 | 131 | if ($message->getStatus() === Message::DIRTY || $force) { |
132 | 132 | $path = sprintf( |
133 | - '%s' . DIRECTORY_SEPARATOR . '%s.%s.%s', |
|
133 | + '%s'.DIRECTORY_SEPARATOR.'%s.%s.%s', |
|
134 | 134 | $translation->getPath(), |
135 | 135 | $translation->getDomain(), |
136 | 136 | $message->getLocale(), |
@@ -74,7 +74,7 @@ |
||
74 | 74 | { |
75 | 75 | $cwd = getcwd(); |
76 | 76 | if (substr($cwd, -3) === 'web') { |
77 | - chdir($cwd . DIRECTORY_SEPARATOR . '..'); |
|
77 | + chdir($cwd.DIRECTORY_SEPARATOR.'..'); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $output = ['error' => false]; |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $domains = $input->getOption('domains'); |
67 | 67 | $export->export($domains, $input->getOption('force')); |
68 | 68 | |
69 | - $prettify = function ($array) { |
|
69 | + $prettify = function($array) { |
|
70 | 70 | return !empty($array) ? implode('</comment><info>`, `</info><comment>', $array) : 'all'; |
71 | 71 | }; |
72 | 72 |