Completed
Push — master ( 92ccbf...b2415b )
by Simonas
63:39
created
Command/ExportCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         $domains = $input->getOption('domains');
61 61
         $export->export($domains);
62 62
 
63
-        $prettify = function ($array) {
63
+        $prettify = function($array) {
64 64
             return !empty($array) ? implode('</comment><info>`, `</info><comment>', $array) : 'all';
65 65
         };
66 66
 
Please login to merge, or discard this patch.
Document/Translation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
DependencyInjection/ONGRTranslationsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Controller/ApiController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     {
113 113
         $cwd = getcwd();
114 114
         if (substr($cwd, -3) === 'web') {
115
-            chdir($cwd . DIRECTORY_SEPARATOR . '..');
115
+            chdir($cwd.DIRECTORY_SEPARATOR.'..');
116 116
         }
117 117
 
118 118
         return new JsonResponse(
Please login to merge, or discard this patch.
Service/Import/ImportManager.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace ONGR\TranslationsBundle\Service;
13 13
 
14
-use Elasticsearch\Common\Exceptions\BadRequest400Exception;
15 14
 use ONGR\ElasticsearchBundle\Service\Manager;
16 15
 use ONGR\TranslationsBundle\Document\Message;
17 16
 use ONGR\TranslationsBundle\Document\Translation;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -156,9 +156,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
Service/Export/ExportManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
             foreach ($messages as $key => $message) {
127 127
                 if ($message->getStatus() === Message::DIRTY) {
128 128
                     $path = sprintf(
129
-                        '%s' . DIRECTORY_SEPARATOR . '%s.%s.%s',
129
+                        '%s'.DIRECTORY_SEPARATOR.'%s.%s.%s',
130 130
                         $translation->getPath(),
131 131
                         $translation->getDomain(),
132 132
                         $message->getLocale(),
Please login to merge, or discard this patch.
Service/TranslationManager.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
     /**
114 114
      * @param string $id
115 115
      *
116
-     * @return Translation
116
+     * @return null|\ReflectionClass
117 117
      *
118 118
      * @throws BadRequestHttpException
119 119
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use ONGR\ElasticsearchDSL\Query\MatchAllQuery;
17 17
 use ONGR\ElasticsearchDSL\Query\TermsQuery;
18 18
 use ONGR\ElasticsearchBundle\Service\Repository;
19
-use ONGR\FilterManagerBundle\Twig\PagerExtension;
20 19
 use ONGR\TranslationsBundle\Document\Message;
21 20
 use ONGR\TranslationsBundle\Document\Translation;
22 21
 use ONGR\TranslationsBundle\Event\Events;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.