Passed
Push — master ( 4e42f9...eb61a8 )
by Jonathan
03:42
created
resources/lang/fr/messages.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,18 +12,18 @@
 block discarded – undo
12 12
 
13 13
 return array (
14 14
 
15
-    'Translation Tool'              =>  'Outil de traduction',
16
-    'Manage webtrees translation.'  =>  'Gère les traductions de webtrees',
17
-    'Translations status'           =>  'Statut des traductions',
18
-    'Missing translations (%s)'     =>  'Traductions manquantes (%s)',
19
-    'Non used MyArtJaub translations (%s)'
20
-                                    =>  'Traductions MyArtJaub non utilisés (%s)',
21
-    'Number of translations'        =>  'Nombre de traductions',
22
-    'Number of translations found in code'
23
-                                    =>  'Nombre de traductions trouvées dans le code',
24
-    'Number of translations in MyArtJaub modules'
25
-                                    =>  'Nombre de traductions dans les modules MyArtJaub',
26
-    'Paths for source code'         =>  'Chemins du code source',
27
-    'References'                    =>  'Références',
15
+                                'Translation Tool'              =>  'Outil de traduction',
16
+                                'Manage webtrees translation.'  =>  'Gère les traductions de webtrees',
17
+                                'Translations status'           =>  'Statut des traductions',
18
+                                'Missing translations (%s)'     =>  'Traductions manquantes (%s)',
19
+                                'Non used MyArtJaub translations (%s)'
20
+                                                                =>  'Traductions MyArtJaub non utilisés (%s)',
21
+                                'Number of translations'        =>  'Nombre de traductions',
22
+                                'Number of translations found in code'
23
+                                                                =>  'Nombre de traductions trouvées dans le code',
24
+                                'Number of translations in MyArtJaub modules'
25
+                                                                =>  'Nombre de traductions dans les modules MyArtJaub',
26
+                                'Paths for source code'         =>  'Chemins du code source',
27
+                                'References'                    =>  'Références',
28 28
     
29 29
 );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3
11 11
  */
12 12
 
13
-return array (
13
+return array(
14 14
 
15 15
     'Translation Tool'              =>  'Outil de traduction',
16 16
     'Manage webtrees translation.'  =>  'Gère les traductions de webtrees',
Please login to merge, or discard this patch.
app/Model/TranslationsAnalyzer.php 2 patches
Indentation   +202 added lines, -202 removed lines patch added patch discarded remove patch
@@ -29,217 +29,217 @@
 block discarded – undo
29 29
 
30 30
    
31 31
     
32
-    /** @var SourceCodeService $sourcecode_service */
33
-    private $sourcecode_service;
34
-    
35
-    /**
36
-     * List of items to be translated found in the code.
37
-     * @var Collection $strings_to_translate
38
-     */
39
-    private $strings_to_translate;
40
-    
41
-    /**
42
-     * List of translations loaded through the standard I18N library.
43
-     * @var Collection $loaded_translations
44
-     */
45
-    private $loaded_translations;
46
-    
47
-    /**
48
-     * List of translations loaded within the MyArtJaub modules
49
-     * @var Collection $maj_translations
50
-     */
51
-    private $maj_translations;
52
-    
53
-    /**
54
-     * List of paths for source code
55
-     * @var Collection $source_code_paths
56
-     */
57
-    private $source_code_paths;
58
-    
59
-    /**
60
-     * Reference language code
61
-     * @var string $language
62
-     */
63
-    private $language;
64
-    
65
-    /**
66
-     * Constructor for TranslationAnalyzer
67
-     *
68
-     * @param SourceCodeService $sourcecode_service
69
-     * @param Collection $code_paths
70
-     * @param string $language
71
-     */
72
-    public function __construct(SourceCodeService $sourcecode_service, Collection $code_paths, string $language = null)
73
-    {
74
-        $this->sourcecode_service = $sourcecode_service;
75
-        $this->language = $language ?? I18N::locale()->languageTag();
76
-        $this->source_code_paths = $code_paths;
77
-    }
78
-    
79
-    /******************************
32
+                                /** @var SourceCodeService $sourcecode_service */
33
+                                private $sourcecode_service;
34
+    
35
+                                /**
36
+                                 * List of items to be translated found in the code.
37
+                                 * @var Collection $strings_to_translate
38
+                                 */
39
+                                private $strings_to_translate;
40
+    
41
+                                /**
42
+                                 * List of translations loaded through the standard I18N library.
43
+                                 * @var Collection $loaded_translations
44
+                                 */
45
+                                private $loaded_translations;
46
+    
47
+                                /**
48
+                                 * List of translations loaded within the MyArtJaub modules
49
+                                 * @var Collection $maj_translations
50
+                                 */
51
+                                private $maj_translations;
52
+    
53
+                                /**
54
+                                 * List of paths for source code
55
+                                 * @var Collection $source_code_paths
56
+                                 */
57
+                                private $source_code_paths;
58
+    
59
+                                /**
60
+                                 * Reference language code
61
+                                 * @var string $language
62
+                                 */
63
+                                private $language;
64
+    
65
+                                /**
66
+                                 * Constructor for TranslationAnalyzer
67
+                                 *
68
+                                 * @param SourceCodeService $sourcecode_service
69
+                                 * @param Collection $code_paths
70
+                                 * @param string $language
71
+                                 */
72
+                                public function __construct(SourceCodeService $sourcecode_service, Collection $code_paths, string $language = null)
73
+                                {
74
+                                $this->sourcecode_service = $sourcecode_service;
75
+                                $this->language = $language ?? I18N::locale()->languageTag();
76
+                                $this->source_code_paths = $code_paths;
77
+                                }
78
+    
79
+                                /******************************
80 80
      *  Data retrieval functions  *
81 81
      ******************************/
82 82
     
83
-    /**
84
-     * Compute the key for a given GetText Translation entry, dealing with context \x04 and plural \x00 cases.
85
-     *
86
-     * @param Translation $translation
87
-     * @return string
88
-     */
89
-    private function getTranslationKey(Translation $translation): string
90
-    {
91
-        $key = $translation->getOriginal();
92
-        if ($translation->getPlural() !== null && strlen($translation->getPlural()) > 0) {
93
-            $key .= I18N::PLURAL . $translation->getPlural();
94
-        }
95
-        if ($translation->getContext() !== null && strlen($translation->getContext()) > 0) {
96
-            $key = $translation->getContext() . I18N::CONTEXT . $key;
97
-        }
98
-        return $key;
99
-    }
100
-    
101
-    /**
102
-     * Returns the strings tagged for translation in the source code.
103
-     * The returned structure is an associative Collection with :
104
-     *      - key: MD5 hash of the Translation key
105
-     *      - value: array [
106
-     *              0 => GetText Translations Header (including domain)
107
-     *              1 => GetTex Translation
108
-     *          ]
109
-     *
110
-     * @return Collection
111
-     */
112
-    private function stringsToTranslate(): Collection
113
-    {
114
-        if ($this->strings_to_translate === null) {
115
-            $strings_to_translate_list = $this->sourcecode_service->findStringsToTranslate($this->source_code_paths);
83
+                                /**
84
+                                 * Compute the key for a given GetText Translation entry, dealing with context \x04 and plural \x00 cases.
85
+                                 *
86
+                                 * @param Translation $translation
87
+                                 * @return string
88
+                                 */
89
+                                private function getTranslationKey(Translation $translation): string
90
+                                {
91
+                                $key = $translation->getOriginal();
92
+                                if ($translation->getPlural() !== null && strlen($translation->getPlural()) > 0) {
93
+                                $key .= I18N::PLURAL . $translation->getPlural();
94
+                                }
95
+                                if ($translation->getContext() !== null && strlen($translation->getContext()) > 0) {
96
+                                $key = $translation->getContext() . I18N::CONTEXT . $key;
97
+                                }
98
+                                return $key;
99
+                                }
100
+    
101
+                                /**
102
+                                 * Returns the strings tagged for translation in the source code.
103
+                                 * The returned structure is an associative Collection with :
104
+                                 *      - key: MD5 hash of the Translation key
105
+                                 *      - value: array [
106
+                                 *              0 => GetText Translations Header (including domain)
107
+                                 *              1 => GetTex Translation
108
+                                 *          ]
109
+                                 *
110
+                                 * @return Collection
111
+                                 */
112
+                                private function stringsToTranslate(): Collection
113
+                                {
114
+                                if ($this->strings_to_translate === null) {
115
+                                $strings_to_translate_list = $this->sourcecode_service->findStringsToTranslate($this->source_code_paths);
116 116
             
117
-            $this->strings_to_translate = new Collection();
118
-            foreach ($strings_to_translate_list as $translations) {
119
-                foreach ($translations as $translation) {
120
-                    $key = md5($this->getTranslationKey($translation));
121
-                    $this->strings_to_translate->put($key, [$translations->getHeaders(), $translation]);
122
-                }
123
-            }
124
-        }
125
-        return $this->strings_to_translate;
126
-    }
127
-    
128
-    /**
129
-     * Returns the list of translations loaded through the standard I18N library.
130
-     * The returned structure is an associative Collection with :
131
-     *      - key: Original translation key
132
-     *      - value: Translated string
133
-     *
134
-     * @return Collection
135
-     */
136
-    private function loadedTranslations(): Collection
137
-    {
138
-        if ($this->loaded_translations === null) {
139
-            $I18N_class = new ReflectionClass('\\Fisharebest\\Webtrees\\I18N');
140
-            $translator_property = $I18N_class->getProperty('translator');
141
-            $translator_property->setAccessible(true);
142
-            $wt_translator = $translator_property->getValue();
117
+                                $this->strings_to_translate = new Collection();
118
+                                foreach ($strings_to_translate_list as $translations) {
119
+                                foreach ($translations as $translation) {
120
+                                $key = md5($this->getTranslationKey($translation));
121
+                                $this->strings_to_translate->put($key, [$translations->getHeaders(), $translation]);
122
+                                }
123
+                                }
124
+                                }
125
+                                return $this->strings_to_translate;
126
+                                }
127
+    
128
+                                /**
129
+                                 * Returns the list of translations loaded through the standard I18N library.
130
+                                 * The returned structure is an associative Collection with :
131
+                                 *      - key: Original translation key
132
+                                 *      - value: Translated string
133
+                                 *
134
+                                 * @return Collection
135
+                                 */
136
+                                private function loadedTranslations(): Collection
137
+                                {
138
+                                if ($this->loaded_translations === null) {
139
+                                $I18N_class = new ReflectionClass('\\Fisharebest\\Webtrees\\I18N');
140
+                                $translator_property = $I18N_class->getProperty('translator');
141
+                                $translator_property->setAccessible(true);
142
+                                $wt_translator = $translator_property->getValue();
143 143
             
144
-            $translator_class = new ReflectionClass(get_class($wt_translator));
145
-            $translations_property = $translator_class->getProperty('translations');
146
-            $translations_property->setAccessible(true);
147
-            $this->loaded_translations = collect($translations_property->getValue($wt_translator));
148
-        }
149
-        return $this->loaded_translations;
150
-    }
151
-    
152
-    /**
153
-     * Returns the list of translations loaded in MyArtJaub modules.
154
-     * The returned structure is an associative Collection with :
155
-     *      - key: MD5 hash of the translation key
156
-     *      - value: array [
157
-     *              0 => Module name
158
-     *              1 => Translation key
159
-     *          ]
160
-     *
161
-     * @return Collection
162
-     */
163
-    private function loadedMyArtJaubTranslations(): Collection
164
-    {
165
-        if ($this->maj_translations === null) {
166
-            $maj_translations_list = $this->sourcecode_service->listMyArtJaubTranslations($this->language);
144
+                                $translator_class = new ReflectionClass(get_class($wt_translator));
145
+                                $translations_property = $translator_class->getProperty('translations');
146
+                                $translations_property->setAccessible(true);
147
+                                $this->loaded_translations = collect($translations_property->getValue($wt_translator));
148
+                                }
149
+                                return $this->loaded_translations;
150
+                                }
151
+    
152
+                                /**
153
+                                 * Returns the list of translations loaded in MyArtJaub modules.
154
+                                 * The returned structure is an associative Collection with :
155
+                                 *      - key: MD5 hash of the translation key
156
+                                 *      - value: array [
157
+                                 *              0 => Module name
158
+                                 *              1 => Translation key
159
+                                 *          ]
160
+                                 *
161
+                                 * @return Collection
162
+                                 */
163
+                                private function loadedMyArtJaubTranslations(): Collection
164
+                                {
165
+                                if ($this->maj_translations === null) {
166
+                                $maj_translations_list = $this->sourcecode_service->listMyArtJaubTranslations($this->language);
167 167
             
168
-            $this->maj_translations = new Collection();
169
-            foreach ($maj_translations_list as $module => $maj_mod_translations) {
170
-                foreach (array_keys($maj_mod_translations) as $maj_mod_translation) {
171
-                    $this->maj_translations->put(md5((string) $maj_mod_translation), [$module, $maj_mod_translation]);
172
-                }
173
-            }
174
-        }
175
-        return $this->maj_translations;
176
-    }
177
-    
178
-    /*************************
168
+                                $this->maj_translations = new Collection();
169
+                                foreach ($maj_translations_list as $module => $maj_mod_translations) {
170
+                                foreach (array_keys($maj_mod_translations) as $maj_mod_translation) {
171
+                                $this->maj_translations->put(md5((string) $maj_mod_translation), [$module, $maj_mod_translation]);
172
+                                }
173
+                                }
174
+                                }
175
+                                return $this->maj_translations;
176
+                                }
177
+    
178
+                                /*************************
179 179
      *  Analyzer functions   *
180 180
      *************************/
181 181
     
182 182
     
183
-    /**
184
-     * Returns the translations missing through the standard I18N.
185
-     * The returned array is composed of items with the structure:
186
-     *      - array [
187
-     *              0 => GetText Translations Header (including domain)
188
-     *              1 => GetTex Translation
189
-     *          ]
190
-     *
191
-     * @return array
192
-     */
193
-    public function missingTranslations(): array
194
-    {
195
-        $missing_translations = array();
196
-        foreach ($this->stringsToTranslate() as $translation_info) {
197
-            list(, $translation) = $translation_info;
198
-            if (!$this->loadedTranslations()->has($this->getTranslationKey($translation))) {
199
-                $missing_translations[] = $translation_info;
200
-            }
201
-        }
183
+                                /**
184
+                                 * Returns the translations missing through the standard I18N.
185
+                                 * The returned array is composed of items with the structure:
186
+                                 *      - array [
187
+                                 *              0 => GetText Translations Header (including domain)
188
+                                 *              1 => GetTex Translation
189
+                                 *          ]
190
+                                 *
191
+                                 * @return array
192
+                                 */
193
+                                public function missingTranslations(): array
194
+                                {
195
+                                $missing_translations = array();
196
+                                foreach ($this->stringsToTranslate() as $translation_info) {
197
+                                list(, $translation) = $translation_info;
198
+                                if (!$this->loadedTranslations()->has($this->getTranslationKey($translation))) {
199
+                                $missing_translations[] = $translation_info;
200
+                                }
201
+                                }
202 202
         
203
-        return $missing_translations;
204
-    }
205
-    
206
-    /**
207
-     * Returns the translations defined in the MaJ modules, but not actually used in the code.
208
-     * The returned array is composed of items with the structure:
209
-     *      - array [
210
-     *              0 => Module name
211
-     *              1 => Translation key
212
-     *          ]
213
-     *
214
-     * @return array
215
-     */
216
-    public function nonUsedMajTranslations(): array
217
-    {
218
-        $removed_translations = array();
219
-        $strings_to_translate_list = $this->stringsToTranslate();
220
-        foreach ($this->loadedMyArtJaubTranslations() as $msgid => $translation_info) {
221
-            if (!$strings_to_translate_list->has($msgid)) {
222
-                $removed_translations[] = $translation_info;
223
-            }
224
-        }
225
-        return $removed_translations;
226
-    }
227
-    
228
-    /**
229
-     * Get some statistics about the translations data.
230
-     * Returns an array with the statistics:
231
-     *      nbTranslations : total number of translations
232
-     *      nbTranslationsFound: total number of translations found in the code
233
-     *      nbMajTranslations: total number of translations loaded in the MyArtJaub modules
234
-     *
235
-     * @return array
236
-     */
237
-    public function translationsStatictics(): array
238
-    {
239
-        return array(
240
-            'nbTranslations' => $this->loadedTranslations()->count(),
241
-            'nbTranslationsFound' => $this->stringsToTranslate()->count(),
242
-            'nbMajTranslations' => $this->loadedMyArtJaubTranslations()->count()
243
-        );
244
-    }
203
+                                return $missing_translations;
204
+                                }
205
+    
206
+                                /**
207
+                                 * Returns the translations defined in the MaJ modules, but not actually used in the code.
208
+                                 * The returned array is composed of items with the structure:
209
+                                 *      - array [
210
+                                 *              0 => Module name
211
+                                 *              1 => Translation key
212
+                                 *          ]
213
+                                 *
214
+                                 * @return array
215
+                                 */
216
+                                public function nonUsedMajTranslations(): array
217
+                                {
218
+                                $removed_translations = array();
219
+                                $strings_to_translate_list = $this->stringsToTranslate();
220
+                                foreach ($this->loadedMyArtJaubTranslations() as $msgid => $translation_info) {
221
+                                if (!$strings_to_translate_list->has($msgid)) {
222
+                                $removed_translations[] = $translation_info;
223
+                                }
224
+                                }
225
+                                return $removed_translations;
226
+                                }
227
+    
228
+                                /**
229
+                                 * Get some statistics about the translations data.
230
+                                 * Returns an array with the statistics:
231
+                                 *      nbTranslations : total number of translations
232
+                                 *      nbTranslationsFound: total number of translations found in the code
233
+                                 *      nbMajTranslations: total number of translations loaded in the MyArtJaub modules
234
+                                 *
235
+                                 * @return array
236
+                                 */
237
+                                public function translationsStatictics(): array
238
+                                {
239
+                                return array(
240
+                                'nbTranslations' => $this->loadedTranslations()->count(),
241
+                                'nbTranslationsFound' => $this->stringsToTranslate()->count(),
242
+                                'nbMajTranslations' => $this->loadedMyArtJaubTranslations()->count()
243
+                                );
244
+                                }
245 245
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@
 block discarded – undo
90 90
     {
91 91
         $key = $translation->getOriginal();
92 92
         if ($translation->getPlural() !== null && strlen($translation->getPlural()) > 0) {
93
-            $key .= I18N::PLURAL . $translation->getPlural();
93
+            $key .= I18N::PLURAL.$translation->getPlural();
94 94
         }
95 95
         if ($translation->getContext() !== null && strlen($translation->getContext()) > 0) {
96
-            $key = $translation->getContext() . I18N::CONTEXT . $key;
96
+            $key = $translation->getContext().I18N::CONTEXT.$key;
97 97
         }
98 98
         return $key;
99 99
     }
Please login to merge, or discard this patch.
app/Services/ComposerService.php 2 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -27,82 +27,82 @@
 block discarded – undo
27 27
 class ComposerService
28 28
 {
29 29
     
30
-    /**
31
-     * Checks whether a Composer package is a MyArtJaub one.
32
-     *
33
-     * @param PackageInterface $package
34
-     * @return bool
35
-     */
36
-    public function isMyArtJaubPackage(PackageInterface $package): bool
37
-    {
38
-        list($vendor) = explode('/', $package->getName(), 2);
39
-        return $vendor == self::MYARTJAUB_VENDOR;
40
-    }
30
+                                /**
31
+                                 * Checks whether a Composer package is a MyArtJaub one.
32
+                                 *
33
+                                 * @param PackageInterface $package
34
+                                 * @return bool
35
+                                 */
36
+                                public function isMyArtJaubPackage(PackageInterface $package): bool
37
+                                {
38
+                                list($vendor) = explode('/', $package->getName(), 2);
39
+                                return $vendor == self::MYARTJAUB_VENDOR;
40
+                                }
41 41
     
42
-    /**
43
-     * Name of the MyArtJaub modules' vendor
44
-     * @var string MYARTJAUB_VENDOR
45
-     * */
46
-    private const MYARTJAUB_VENDOR = 'jon48';
42
+                                /**
43
+                                 * Name of the MyArtJaub modules' vendor
44
+                                 * @var string MYARTJAUB_VENDOR
45
+                                 * */
46
+                                private const MYARTJAUB_VENDOR = 'jon48';
47 47
     
48
-    /**
49
-     * List all the PSR-4 paths used in MyArtJaub packages autoloading.
50
-     * The returned array is composed of items with the structure:
51
-     *      - array [
52
-     *              0 => Package Name
53
-     *              1 => Array of normalised paths
54
-     *          ]
55
-     *
56
-     * @return array
57
-     */
58
-    public function listMyArtJaubPackagesPaths(): array
59
-    {
60
-        $composer = Factory::create(new NullIO(), Webtrees::ROOT_DIR . 'composer.json');
48
+                                /**
49
+                                 * List all the PSR-4 paths used in MyArtJaub packages autoloading.
50
+                                 * The returned array is composed of items with the structure:
51
+                                 *      - array [
52
+                                 *              0 => Package Name
53
+                                 *              1 => Array of normalised paths
54
+                                 *          ]
55
+                                 *
56
+                                 * @return array
57
+                                 */
58
+                                public function listMyArtJaubPackagesPaths(): array
59
+                                {
60
+                                $composer = Factory::create(new NullIO(), Webtrees::ROOT_DIR . 'composer.json');
61 61
         
62
-        $packages = $composer->getRepositoryManager()
63
-            ->getLocalRepository()
64
-            ->getPackages();
62
+                                $packages = $composer->getRepositoryManager()
63
+                                ->getLocalRepository()
64
+                                ->getPackages();
65 65
             
66
-        /** @var array<PackageInterface> $maj_packages */
67
-        $maj_packages = array();
68
-        foreach ($packages as $package) {
69
-            if ($this->isMyArtJaubPackage($package)) {
70
-                $maj_packages[] = $this->extractPsr4Paths($composer, $package);
71
-            }
72
-        }
66
+                                /** @var array<PackageInterface> $maj_packages */
67
+                                $maj_packages = array();
68
+                                foreach ($packages as $package) {
69
+                                if ($this->isMyArtJaubPackage($package)) {
70
+                                $maj_packages[] = $this->extractPsr4Paths($composer, $package);
71
+                                }
72
+                                }
73 73
         
74
-        return $maj_packages;
75
-    }
74
+                                return $maj_packages;
75
+                                }
76 76
     
77
-    /**
78
-     * Extract and normalise the PSR-4 paths used in a package autoloading.
79
-     * The returned array is a 2-tuple with the structure:
80
-     *      - array [
81
-     *              0 => Package Name
82
-     *              1 => Array of normalised paths
83
-     *          ]
84
-     *
85
-     * @param Composer $composer
86
-     * @param PackageInterface $package
87
-     * @return array
88
-     */
89
-    private function extractPsr4Paths(Composer $composer, PackageInterface $package): array
90
-    {
91
-        $autoload_generator = $composer->getAutoloadGenerator();
77
+                                /**
78
+                                 * Extract and normalise the PSR-4 paths used in a package autoloading.
79
+                                 * The returned array is a 2-tuple with the structure:
80
+                                 *      - array [
81
+                                 *              0 => Package Name
82
+                                 *              1 => Array of normalised paths
83
+                                 *          ]
84
+                                 *
85
+                                 * @param Composer $composer
86
+                                 * @param PackageInterface $package
87
+                                 * @return array
88
+                                 */
89
+                                private function extractPsr4Paths(Composer $composer, PackageInterface $package): array
90
+                                {
91
+                                $autoload_generator = $composer->getAutoloadGenerator();
92 92
         
93
-        $package_map = $autoload_generator->buildPackageMap(
94
-            $composer->getInstallationManager(),
95
-            $composer->getPackage(),
96
-            [$package]
97
-        );
98
-        array_shift($package_map);
99
-        $autoloads = $autoload_generator->parseAutoloads($package_map, $composer->getPackage());
100
-        $psr4_paths = [];
101
-        foreach ($autoloads['psr-4'] as $psr4_ns_paths) {
102
-            foreach ($psr4_ns_paths as $psr4_ns_path) {
103
-                $psr4_paths[] = realpath($psr4_ns_path);
104
-            }
105
-        }
106
-        return [$package, $psr4_paths];
107
-    }
93
+                                $package_map = $autoload_generator->buildPackageMap(
94
+                                $composer->getInstallationManager(),
95
+                                $composer->getPackage(),
96
+                                [$package]
97
+                                );
98
+                                array_shift($package_map);
99
+                                $autoloads = $autoload_generator->parseAutoloads($package_map, $composer->getPackage());
100
+                                $psr4_paths = [];
101
+                                foreach ($autoloads['psr-4'] as $psr4_ns_paths) {
102
+                                foreach ($psr4_ns_paths as $psr4_ns_path) {
103
+                                $psr4_paths[] = realpath($psr4_ns_path);
104
+                                }
105
+                                }
106
+                                return [$package, $psr4_paths];
107
+                                }
108 108
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function listMyArtJaubPackagesPaths(): array
59 59
     {
60
-        $composer = Factory::create(new NullIO(), Webtrees::ROOT_DIR . 'composer.json');
60
+        $composer = Factory::create(new NullIO(), Webtrees::ROOT_DIR.'composer.json');
61 61
         
62 62
         $packages = $composer->getRepositoryManager()
63 63
             ->getLocalRepository()
Please login to merge, or discard this patch.
app/Services/SourceCodeService.php 2 patches
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -28,129 +28,129 @@
 block discarded – undo
28 28
 class SourceCodeService
29 29
 {
30 30
     
31
-    /**
32
-     * Gettext Translations merge strategy to be used - Use Theirs data
33
-     * @var unknown
34
-     */
35
-    private const MERGE_STRATEGY_THEIRS = Merge::HEADERS_OVERRIDE
36
-        | Merge::TRANSLATIONS_THEIRS
37
-        | Merge::TRANSLATIONS_OVERRIDE
38
-        | Merge::EXTRACTED_COMMENTS_THEIRS
39
-        | Merge::REFERENCES_THEIRS
40
-        | Merge::FLAGS_THEIRS
41
-        | Merge::COMMENTS_THEIRS;
31
+                                /**
32
+                                 * Gettext Translations merge strategy to be used - Use Theirs data
33
+                                 * @var unknown
34
+                                 */
35
+                                private const MERGE_STRATEGY_THEIRS = Merge::HEADERS_OVERRIDE
36
+                                | Merge::TRANSLATIONS_THEIRS
37
+                                | Merge::TRANSLATIONS_OVERRIDE
38
+                                | Merge::EXTRACTED_COMMENTS_THEIRS
39
+                                | Merge::REFERENCES_THEIRS
40
+                                | Merge::FLAGS_THEIRS
41
+                                | Merge::COMMENTS_THEIRS;
42 42
     
43
-    /**
44
-     * I18N functions to be looked for in the code
45
-     * @var array
46
-     */
47
-    private const I18N_FUNCTIONS = [
48
-        'translate' => 'gettext',
49
-        'plural' => 'ngettext',
50
-        'translateContext' => 'pgettext'
51
-    ];
43
+                                /**
44
+                                 * I18N functions to be looked for in the code
45
+                                 * @var array
46
+                                 */
47
+                                private const I18N_FUNCTIONS = [
48
+                                'translate' => 'gettext',
49
+                                'plural' => 'ngettext',
50
+                                'translateContext' => 'pgettext'
51
+                                ];
52 52
     
53
-    /**
54
-     * Lists all paths containing source code to be scanned for translations.
55
-     * This contains the MyArtJaub modules's resources folder,
56
-     * as well as MyArtJaub modules PSR-4 autoloading paths loaded through Composer
57
-     *
58
-     * @return Collection
59
-     */
60
-    public function sourceCodePaths(): Collection
61
-    {
62
-        $paths = app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
63
-            ->mapWithKeys(function (AbstractModuleMaj $module) {
64
-                return [$module->name() => [realpath($module->resourcesFolder())]];
65
-            });
53
+                                /**
54
+                                 * Lists all paths containing source code to be scanned for translations.
55
+                                 * This contains the MyArtJaub modules's resources folder,
56
+                                 * as well as MyArtJaub modules PSR-4 autoloading paths loaded through Composer
57
+                                 *
58
+                                 * @return Collection
59
+                                 */
60
+                                public function sourceCodePaths(): Collection
61
+                                {
62
+                                $paths = app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
63
+                                ->mapWithKeys(function (AbstractModuleMaj $module) {
64
+                                return [$module->name() => [realpath($module->resourcesFolder())]];
65
+                                });
66 66
         
67
-        $maj_packages = app(ComposerService::class)->listMyArtJaubPackagesPaths();
67
+                                $maj_packages = app(ComposerService::class)->listMyArtJaubPackagesPaths();
68 68
         
69
-        foreach ($maj_packages as list($maj_package, $psr4_paths)) {
70
-            /** @var PackageInterface $maj_package */
71
-            $installer_name = $maj_package->getExtra()['installer-name'] ?? '';
72
-            $key = $installer_name === '' ? $maj_package->getName() : '_' . $installer_name . '_';
73
-            if (count($psr4_paths) > 0) {
74
-                $paths->put($key, array_merge($paths->get($key, []), $psr4_paths));
75
-            }
76
-        }
69
+                                foreach ($maj_packages as list($maj_package, $psr4_paths)) {
70
+                                /** @var PackageInterface $maj_package */
71
+                                $installer_name = $maj_package->getExtra()['installer-name'] ?? '';
72
+                                $key = $installer_name === '' ? $maj_package->getName() : '_' . $installer_name . '_';
73
+                                if (count($psr4_paths) > 0) {
74
+                                $paths->put($key, array_merge($paths->get($key, []), $psr4_paths));
75
+                                }
76
+                                }
77 77
         
78
-        return $paths;
79
-    }
78
+                                return $paths;
79
+                                }
80 80
     
81
-    /**
82
-     * Find all strings to be translated in PHP or PHTML files for a set of source code paths
83
-     * The returned structure is a associated Collection with:
84
-     *      - key: package/domain
85
-     *      - value: Gettext Translations object for that domain
86
-     *
87
-     * @param Collection $source_code_paths
88
-     * @return Collection
89
-     */
90
-    public function findStringsToTranslate(Collection $source_code_paths): Collection
91
-    {
92
-        $strings_to_translate = new Collection();
93
-        foreach ($source_code_paths as $package => $paths) {
94
-            $php_files = array();
95
-            foreach ($paths as $path) {
96
-                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.php') ?: array());
97
-                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.phtml') ?: array());
98
-            }
81
+                                /**
82
+                                 * Find all strings to be translated in PHP or PHTML files for a set of source code paths
83
+                                 * The returned structure is a associated Collection with:
84
+                                 *      - key: package/domain
85
+                                 *      - value: Gettext Translations object for that domain
86
+                                 *
87
+                                 * @param Collection $source_code_paths
88
+                                 * @return Collection
89
+                                 */
90
+                                public function findStringsToTranslate(Collection $source_code_paths): Collection
91
+                                {
92
+                                $strings_to_translate = new Collection();
93
+                                foreach ($source_code_paths as $package => $paths) {
94
+                                $php_files = array();
95
+                                foreach ($paths as $path) {
96
+                                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.php') ?: array());
97
+                                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.phtml') ?: array());
98
+                                }
99 99
             
100
-            $php_scanner = new PhpScanner(Translations::create($package));
101
-            $php_scanner
102
-                ->setFunctions(self::I18N_FUNCTIONS)
103
-                ->ignoreInvalidFunctions(true);
104
-            $php_scanner->setDefaultDomain($package);
105
-            foreach ($php_files as $php_file) {
106
-                $php_scanner->scanFile($php_file);
107
-            }
100
+                                $php_scanner = new PhpScanner(Translations::create($package));
101
+                                $php_scanner
102
+                                ->setFunctions(self::I18N_FUNCTIONS)
103
+                                ->ignoreInvalidFunctions(true);
104
+                                $php_scanner->setDefaultDomain($package);
105
+                                foreach ($php_files as $php_file) {
106
+                                $php_scanner->scanFile($php_file);
107
+                                }
108 108
             
109
-            $strings_to_translate->put(
110
-                $package,
111
-                $strings_to_translate
112
-                    ->get($package, Translations::create())
113
-                    ->mergeWith($php_scanner->getTranslations()[$package], self::MERGE_STRATEGY_THEIRS)
114
-            );
115
-        }
116
-        return $strings_to_translate;
117
-    }
109
+                                $strings_to_translate->put(
110
+                                $package,
111
+                                $strings_to_translate
112
+                                ->get($package, Translations::create())
113
+                                ->mergeWith($php_scanner->getTranslations()[$package], self::MERGE_STRATEGY_THEIRS)
114
+                                );
115
+                                }
116
+                                return $strings_to_translate;
117
+                                }
118 118
     
119
-    /**
120
-     * List all translations defined in MyArtJaub modules
121
-     * The returned structure is a associated Collection with:
122
-     *      - key: module name
123
-     *      - value: array of translations for the module
124
-     *
125
-     * @param string $language
126
-     * @return Collection
127
-     */
128
-    public function listMyArtJaubTranslations(string $language): Collection
129
-    {
130
-        return app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
131
-            ->mapWithKeys(function (AbstractModuleMaj $module) use ($language) {
132
-                return [$module->name() => $module->customTranslations($language)];
133
-            });
134
-    }
119
+                                /**
120
+                                 * List all translations defined in MyArtJaub modules
121
+                                 * The returned structure is a associated Collection with:
122
+                                 *      - key: module name
123
+                                 *      - value: array of translations for the module
124
+                                 *
125
+                                 * @param string $language
126
+                                 * @return Collection
127
+                                 */
128
+                                public function listMyArtJaubTranslations(string $language): Collection
129
+                                {
130
+                                return app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
131
+                                ->mapWithKeys(function (AbstractModuleMaj $module) use ($language) {
132
+                                return [$module->name() => $module->customTranslations($language)];
133
+                                });
134
+                                }
135 135
     
136
-    /**
137
-     * Extension of the standard PHP glob function to apply it recursively.
138
-     *
139
-     * @param string $pattern
140
-     * @param int $flags
141
-     * @return string[]
142
-     * @see glob()
143
-     * @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
144
-     */
145
-    protected function glob_recursive(string $pattern, int $flags = 0): array
146
-    {
147
-        $files = glob($pattern, $flags) ?: [];
148
-        $dirs = glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: [];
136
+                                /**
137
+                                 * Extension of the standard PHP glob function to apply it recursively.
138
+                                 *
139
+                                 * @param string $pattern
140
+                                 * @param int $flags
141
+                                 * @return string[]
142
+                                 * @see glob()
143
+                                 * @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
144
+                                 */
145
+                                protected function glob_recursive(string $pattern, int $flags = 0): array
146
+                                {
147
+                                $files = glob($pattern, $flags) ?: [];
148
+                                $dirs = glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: [];
149 149
         
150
-        foreach ($dirs as $dir) {
151
-            $files = array_merge($files, $this->glob_recursive($dir . '/' . basename($pattern), $flags));
152
-        }
150
+                                foreach ($dirs as $dir) {
151
+                                $files = array_merge($files, $this->glob_recursive($dir . '/' . basename($pattern), $flags));
152
+                                }
153 153
         
154
-        return $files;
155
-    }
154
+                                return $files;
155
+                                }
156 156
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function sourceCodePaths(): Collection
61 61
     {
62 62
         $paths = app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
63
-            ->mapWithKeys(function (AbstractModuleMaj $module) {
63
+            ->mapWithKeys(function(AbstractModuleMaj $module) {
64 64
                 return [$module->name() => [realpath($module->resourcesFolder())]];
65 65
             });
66 66
         
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         foreach ($maj_packages as list($maj_package, $psr4_paths)) {
70 70
             /** @var PackageInterface $maj_package */
71 71
             $installer_name = $maj_package->getExtra()['installer-name'] ?? '';
72
-            $key = $installer_name === '' ? $maj_package->getName() : '_' . $installer_name . '_';
72
+            $key = $installer_name === '' ? $maj_package->getName() : '_'.$installer_name.'_';
73 73
             if (count($psr4_paths) > 0) {
74 74
                 $paths->put($key, array_merge($paths->get($key, []), $psr4_paths));
75 75
             }
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
         foreach ($source_code_paths as $package => $paths) {
94 94
             $php_files = array();
95 95
             foreach ($paths as $path) {
96
-                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.php') ?: array());
97
-                $php_files = array_merge($php_files, $this->glob_recursive($path . '/*.phtml') ?: array());
96
+                $php_files = array_merge($php_files, $this->glob_recursive($path.'/*.php') ?: array());
97
+                $php_files = array_merge($php_files, $this->glob_recursive($path.'/*.phtml') ?: array());
98 98
             }
99 99
             
100 100
             $php_scanner = new PhpScanner(Translations::create($package));
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function listMyArtJaubTranslations(string $language): Collection
129 129
     {
130 130
         return app(ModuleService::class)->findByInterface(AbstractModuleMaj::class)
131
-            ->mapWithKeys(function (AbstractModuleMaj $module) use ($language) {
131
+            ->mapWithKeys(function(AbstractModuleMaj $module) use ($language) {
132 132
                 return [$module->name() => $module->customTranslations($language)];
133 133
             });
134 134
     }
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
     protected function glob_recursive(string $pattern, int $flags = 0): array
146 146
     {
147 147
         $files = glob($pattern, $flags) ?: [];
148
-        $dirs = glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: [];
148
+        $dirs = glob(dirname($pattern).'/*', GLOB_ONLYDIR | GLOB_NOSORT) ?: [];
149 149
         
150 150
         foreach ($dirs as $dir) {
151
-            $files = array_merge($files, $this->glob_recursive($dir . '/' . basename($pattern), $flags));
151
+            $files = array_merge($files, $this->glob_recursive($dir.'/'.basename($pattern), $flags));
152 152
         }
153 153
         
154 154
         return $files;
Please login to merge, or discard this patch.
app/Http/RequestHandlers/TranslationStatus.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -30,53 +30,53 @@
 block discarded – undo
30 30
  */
31 31
 class TranslationStatus implements RequestHandlerInterface
32 32
 {
33
-    use ViewResponseTrait;
33
+                                use ViewResponseTrait;
34 34
     
35
-    /** @var TranslationToolModule $module */
36
-    private $module;
35
+                                /** @var TranslationToolModule $module */
36
+                                private $module;
37 37
     
38
-    /** @var SourceCodeService $sourcecode_service */
39
-    private $sourcecode_service;
38
+                                /** @var SourceCodeService $sourcecode_service */
39
+                                private $sourcecode_service;
40 40
     
41
-    /**
42
-     * Constructor for TranslationStatus request handler
43
-     *
44
-     * @param ModuleService $module_service
45
-     * @param SourceCodeService $sourcecode_service
46
-     */
47
-    public function __construct(ModuleService $module_service, SourceCodeService $sourcecode_service)
48
-    {
49
-        $this->module = $module_service->findByInterface(TranslationToolModule::class)->first();
50
-        $this->sourcecode_service = $sourcecode_service;
51
-    }
41
+                                /**
42
+                                 * Constructor for TranslationStatus request handler
43
+                                 *
44
+                                 * @param ModuleService $module_service
45
+                                 * @param SourceCodeService $sourcecode_service
46
+                                 */
47
+                                public function __construct(ModuleService $module_service, SourceCodeService $sourcecode_service)
48
+                                {
49
+                                $this->module = $module_service->findByInterface(TranslationToolModule::class)->first();
50
+                                $this->sourcecode_service = $sourcecode_service;
51
+                                }
52 52
     
53
-    /**
54
-     * {@inheritDoc}
55
-     * @see \Psr\Http\Server\RequestHandlerInterface::handle()
56
-     */
57
-    public function handle(ServerRequestInterface $request): ResponseInterface
58
-    {
59
-        $this->layout = 'layouts/administration';
53
+                                /**
54
+                                 * {@inheritDoc}
55
+                                 * @see \Psr\Http\Server\RequestHandlerInterface::handle()
56
+                                 */
57
+                                public function handle(ServerRequestInterface $request): ResponseInterface
58
+                                {
59
+                                $this->layout = 'layouts/administration';
60 60
         
61
-        if ($this->module === null) {
62
-            throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
63
-        }
61
+                                if ($this->module === null) {
62
+                                throw new HttpNotFoundException(I18N::translate('The attached module could not be found.'));
63
+                                }
64 64
         
65
-        $locale = I18N::locale();
66
-        $sourceCodePaths = $this->sourcecode_service->sourceCodePaths();
67
-        $translation_analyser = new TranslationsAnalyzer(
68
-            $this->sourcecode_service,
69
-            $sourceCodePaths,
70
-            $locale->languageTag()
71
-        );
65
+                                $locale = I18N::locale();
66
+                                $sourceCodePaths = $this->sourcecode_service->sourceCodePaths();
67
+                                $translation_analyser = new TranslationsAnalyzer(
68
+                                $this->sourcecode_service,
69
+                                $sourceCodePaths,
70
+                                $locale->languageTag()
71
+                                );
72 72
         
73
-        return $this->viewResponse($this->module->name() . '::status', [
74
-            'title'                 =>  $this->module->title(),
75
-            'language'              =>  $locale->endonym(),
76
-            'source_code_paths'     =>  $sourceCodePaths->flatten()->sort(),
77
-            'translations_stats'    =>  $translation_analyser->translationsStatictics(),
78
-            'missing_translations'  =>  $translation_analyser->missingTranslations(),
79
-            'non_used_translations' =>  $translation_analyser->nonUsedMajTranslations()
80
-        ]);
81
-    }
73
+                                return $this->viewResponse($this->module->name() . '::status', [
74
+                                'title'                 =>  $this->module->title(),
75
+                                'language'              =>  $locale->endonym(),
76
+                                'source_code_paths'     =>  $sourceCodePaths->flatten()->sort(),
77
+                                'translations_stats'    =>  $translation_analyser->translationsStatictics(),
78
+                                'missing_translations'  =>  $translation_analyser->missingTranslations(),
79
+                                'non_used_translations' =>  $translation_analyser->nonUsedMajTranslations()
80
+                                ]);
81
+                                }
82 82
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             $locale->languageTag()
71 71
         );
72 72
         
73
-        return $this->viewResponse($this->module->name() . '::status', [
73
+        return $this->viewResponse($this->module->name().'::status', [
74 74
             'title'                 =>  $this->module->title(),
75 75
             'language'              =>  $locale->endonym(),
76 76
             'source_code_paths'     =>  $sourceCodePaths->flatten()->sort(),
Please login to merge, or discard this patch.
app/TranslationToolModule.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -27,65 +27,65 @@
 block discarded – undo
27 27
  */
28 28
 class TranslationToolModule extends AbstractModuleMaj implements ModuleConfigInterface
29 29
 {
30
-    /**
31
-     * {@inheritDoc}
32
-     * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
33
-     */
34
-    public function title(): string
35
-    {
36
-        return I18N::translate('Translation Tool');
37
-    }
30
+                                /**
31
+                                 * {@inheritDoc}
32
+                                 * @see \Fisharebest\Webtrees\Module\AbstractModule::title()
33
+                                 */
34
+                                public function title(): string
35
+                                {
36
+                                return I18N::translate('Translation Tool');
37
+                                }
38 38
     
39
-    /**
40
-     * {@inheritDoc}
41
-     * @see \Fisharebest\Webtrees\Module\AbstractModule::description()
42
-     */
43
-    public function description(): string
44
-    {
45
-        return I18N::translate('Manage webtrees translation.');
46
-    }
39
+                                /**
40
+                                 * {@inheritDoc}
41
+                                 * @see \Fisharebest\Webtrees\Module\AbstractModule::description()
42
+                                 */
43
+                                public function description(): string
44
+                                {
45
+                                return I18N::translate('Manage webtrees translation.');
46
+                                }
47 47
     
48
-    public function customModuleVersion(): string
49
-    {
50
-        return '2.0.6-v.1';
51
-    }
48
+                                public function customModuleVersion(): string
49
+                                {
50
+                                return '2.0.6-v.1';
51
+                                }
52 52
     
53
-    /**
54
-     * {@inheritDoc}
55
-     * @see \MyArtJaub\Webtrees\Module\AbstractModuleMaj::customModuleSupportUrl()
56
-     */
57
-    public function customModuleSupportUrl(): string
58
-    {
59
-        return 'https://github.com/jon48/webtrees-mod-translationtool';
60
-    }
53
+                                /**
54
+                                 * {@inheritDoc}
55
+                                 * @see \MyArtJaub\Webtrees\Module\AbstractModuleMaj::customModuleSupportUrl()
56
+                                 */
57
+                                public function customModuleSupportUrl(): string
58
+                                {
59
+                                return 'https://github.com/jon48/webtrees-mod-translationtool';
60
+                                }
61 61
     
62
-    /**
63
-     * {@inheritDoc}
64
-     * @see \MyArtJaub\Webtrees\Module\AbstractModuleMaj::loadRoutes()
65
-     */
66
-    public function loadRoutes(Map $router): void
67
-    {
68
-        $router->attach('', '', static function (Map $router) {
62
+                                /**
63
+                                 * {@inheritDoc}
64
+                                 * @see \MyArtJaub\Webtrees\Module\AbstractModuleMaj::loadRoutes()
65
+                                 */
66
+                                public function loadRoutes(Map $router): void
67
+                                {
68
+                                $router->attach('', '', static function (Map $router) {
69 69
 
70 70
             
71
-            $router->attach('', '/module-maj/translationtool', static function (Map $router) {
71
+                                $router->attach('', '/module-maj/translationtool', static function (Map $router) {
72 72
 
73
-                $router->extras([
74
-                    'middleware' => [
75
-                        AuthAdministrator::class,
76
-                    ],
77
-                ]);
78
-                $router->get(TranslationStatus::class, '/status', TranslationStatus::class);
79
-            });
80
-        });
81
-    }
73
+                                $router->extras([
74
+                                'middleware' => [
75
+                                AuthAdministrator::class,
76
+                                ],
77
+                                ]);
78
+                                $router->get(TranslationStatus::class, '/status', TranslationStatus::class);
79
+                                });
80
+                                });
81
+                                }
82 82
     
83
-    /**
84
-     * {@inheritDoc}
85
-     * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
86
-     */
87
-    public function getConfigLink(): string
88
-    {
89
-        return route(TranslationStatus::class);
90
-    }
83
+                                /**
84
+                                 * {@inheritDoc}
85
+                                 * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink()
86
+                                 */
87
+                                public function getConfigLink(): string
88
+                                {
89
+                                return route(TranslationStatus::class);
90
+                                }
91 91
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,10 +65,10 @@
 block discarded – undo
65 65
      */
66 66
     public function loadRoutes(Map $router): void
67 67
     {
68
-        $router->attach('', '', static function (Map $router) {
68
+        $router->attach('', '', static function(Map $router) {
69 69
 
70 70
             
71
-            $router->attach('', '/module-maj/translationtool', static function (Map $router) {
71
+            $router->attach('', '/module-maj/translationtool', static function(Map $router) {
72 72
 
73 73
                 $router->extras([
74 74
                     'middleware' => [
Please login to merge, or discard this patch.