Passed
Branch develop (63b306)
by Alexander
03:47
created
src/Controllers/TranslatorAdminController.php 2 patches
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,16 +27,14 @@  discard block
 block discarded – undo
27 27
      *
28 28
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
29 29
      */
30
-    public function index()
31
-    {
30
+    public function index() {
32 31
         $search = Input::get('search', '');
33 32
         $locale = Input::get('locale', '');
34 33
 
35 34
         $query = TranslationIdentifier::with('translations');
36 35
 
37 36
         if ($locale != '') {
38
-            $query = $query->whereDoesntHave('translations', function ($query) use ($locale)
39
-                {
37
+            $query = $query->whereDoesntHave('translations', function ($query) use ($locale) {
40 38
                     $query->where('translations.locale', 'like', $locale);
41 39
                 }
42 40
             );
@@ -73,8 +71,7 @@  discard block
 block discarded – undo
73 71
      * @param integer $id ID of the translation Identifier to edit
74 72
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
75 73
      */
76
-    public function edit($id)
77
-    {
74
+    public function edit($id) {
78 75
         $identifier = TranslationIdentifier::findOrFail($id);
79 76
 
80 77
         $available_locales = TranslatorFacade::getConfigValue('available_locales');
@@ -97,8 +94,7 @@  discard block
 block discarded – undo
97 94
      * @param Request $request Object with the values of the identifier
98 95
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
99 96
      */
100
-    public function postEdit($id, Request $request)
101
-    {
97
+    public function postEdit($id, Request $request) {
102 98
         TranslationIdentifier::findOrFail($id);
103 99
 
104 100
         foreach ($request->all() as $key => $value) {
@@ -131,8 +127,7 @@  discard block
 block discarded – undo
131 127
      * @param Request $request Request with multiple values of identifiers to update
132 128
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
133 129
      */
134
-    public function postIdentifier(Request $request)
135
-    {
130
+    public function postIdentifier(Request $request) {
136 131
         /** @var TranslationIdentifier $translation_identifiers */
137 132
         $translation_identifiers = TranslationIdentifier::all()->whereIn('id', array_keys($request->all()));
138 133
 
@@ -159,8 +154,7 @@  discard block
 block discarded – undo
159 154
      *
160 155
      * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
161 156
      */
162
-    public function test()
163
-    {
157
+    public function test() {
164 158
         return view('translator::test');
165 159
     }
166 160
 
@@ -168,8 +162,7 @@  discard block
 block discarded – undo
168 162
      * @param $state string 'enabled|disabled'
169 163
      * @return \Illuminate\Http\RedirectResponse
170 164
      */
171
-    public function changeLiveMode ($state)
172
-    {
165
+    public function changeLiveMode ($state) {
173 166
         if ($state == 'enable') {
174 167
             session(['translation_live_mode' => true]);
175 168
         } else {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $query = TranslationIdentifier::with('translations');
36 36
 
37 37
         if ($locale != '') {
38
-            $query = $query->whereDoesntHave('translations', function ($query) use ($locale)
38
+            $query = $query->whereDoesntHave('translations', function($query) use ($locale)
39 39
                 {
40 40
                     $query->where('translations.locale', 'like', $locale);
41 41
                 }
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
         }
44 44
 
45 45
         if ($search != '') {
46
-            $query = $query->where(function ($query) use ($search) {
47
-                $query ->where('identifier',     'LIKE', '%'.$search.'%')
48
-                    ->orWhere('parameters', 'LIKE', '%'.$search.'%')
49
-                    ->orWhere('group',      'LIKE', '%'.$search.'%')
50
-                    ->orWhere('page_name',  'LIKE', '%'.$search.'%')
51
-                    ->orWhere('description','LIKE', '%'.$search.'%');
46
+            $query = $query->where(function($query) use ($search) {
47
+                $query ->where('identifier', 'LIKE', '%' . $search . '%')
48
+                    ->orWhere('parameters', 'LIKE', '%' . $search . '%')
49
+                    ->orWhere('group', 'LIKE', '%' . $search . '%')
50
+                    ->orWhere('page_name', 'LIKE', '%' . $search . '%')
51
+                    ->orWhere('description', 'LIKE', '%' . $search . '%');
52 52
             });
53 53
         }
54 54
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
             $translation_identifier = $translation_identifiers->find($id);
146 146
 
147
-            $translation_identifier->description    = isset($identifier['description']) ? $identifier['description'] : null;
147
+            $translation_identifier->description = isset($identifier['description']) ? $identifier['description'] : null;
148 148
 
149 149
             $translation_identifier->save();
150 150
         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @param $state string 'enabled|disabled'
166 166
      * @return \Illuminate\Http\RedirectResponse
167 167
      */
168
-    public function changeLiveMode ($state)
168
+    public function changeLiveMode($state)
169 169
     {
170 170
         if ($state == 'enable') {
171 171
             session(['translation_live_mode' => true]);
Please login to merge, or discard this patch.
src/Middleware/TranslatorMiddleware.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
      *
31 31
      * @todo Validate Browser locale string (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4)
32 32
      */
33
-    public function handle(Request $request, Closure $next)
34
-    {
33
+    public function handle(Request $request, Closure $next) {
35 34
         if (Session::has('locale') || auth()->check()) {
36 35
             $locale = Session::has('locale') ? session()->get('locale') : auth()->user()->language;
37 36
 
Please login to merge, or discard this patch.
src/Handler/DefaultHandler.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @param $locale
50 50
      */
51
-    function __construct($locale){
51
+    function __construct($locale) {
52 52
         $this->locale = $locale;
53 53
     }
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return string
59 59
      */
60
-    function getLocale(){
60
+    function getLocale() {
61 61
         return $this->locale;
62 62
     }
63 63
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $group
69 69
      * @return string
70 70
      */
71
-    function getTranslation($identifier, $group){
71
+    function getTranslation($identifier, $group) {
72 72
         return $identifier;
73 73
     }
74 74
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return bool
79 79
      */
80
-    function refreshCache(){
80
+    function refreshCache() {
81 81
         return true;
82 82
     }
83 83
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param string $group
88 88
      * @return array
89 89
      */
90
-    function getAllTranslations($group){
90
+    function getAllTranslations($group) {
91 91
         return [];
92 92
     }
93 93
 
Please login to merge, or discard this patch.
Braces   +14 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,21 +16,27 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * Class TranslationNotFoundException
18 18
  */
19
-class TranslationNotFoundException extends \Exception {}
19
+class TranslationNotFoundException extends \Exception
20
+{
21
+}
20 22
 
21 23
 /**
22 24
  * Custom Exception to distinguish if the Translation Identifier was not found in Cache but could be in DB
23 25
  *
24 26
  * Class TranslationNotInCacheException
25 27
  */
26
-class TranslationNotInCacheException extends TranslationNotFoundException {}
28
+class TranslationNotInCacheException extends TranslationNotFoundException
29
+{
30
+}
27 31
 
28 32
 /**
29 33
  * Custom Exception thrown when a cache file could not be found
30 34
  *
31 35
  * Class TranslationCacheNotFound
32 36
  */
33
-class TranslationCacheNotFound extends \Exception {}
37
+class TranslationCacheNotFound extends \Exception
38
+{
39
+}
34 40
 
35 41
 /**
36 42
  * Interface HandlerInterface
@@ -48,7 +54,7 @@  discard block
 block discarded – undo
48 54
      *
49 55
      * @param $locale
50 56
      */
51
-    function __construct($locale){
57
+    function __construct($locale) {
52 58
         $this->locale = $locale;
53 59
     }
54 60
 
@@ -57,7 +63,7 @@  discard block
 block discarded – undo
57 63
      *
58 64
      * @return string
59 65
      */
60
-    function getLocale(){
66
+    function getLocale() {
61 67
         return $this->locale;
62 68
     }
63 69
 
@@ -68,7 +74,7 @@  discard block
 block discarded – undo
68 74
      * @param string $group
69 75
      * @return string
70 76
      */
71
-    function getTranslation($identifier, $group){
77
+    function getTranslation($identifier, $group) {
72 78
         return $identifier;
73 79
     }
74 80
 
@@ -77,7 +83,7 @@  discard block
 block discarded – undo
77 83
      *
78 84
      * @return bool
79 85
      */
80
-    function refreshCache(){
86
+    function refreshCache() {
81 87
         return true;
82 88
     }
83 89
 
@@ -87,7 +93,7 @@  discard block
 block discarded – undo
87 93
      * @param string $group
88 94
      * @return array
89 95
      */
90
-    function getAllTranslations($group){
96
+    function getAllTranslations($group) {
91 97
         return [];
92 98
     }
93 99
 
Please login to merge, or discard this patch.
src/Handler/DatabaseHandler.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     {
43 43
         if (isset($this->translations[$identifier])) {
44 44
             if ($this->translations[$identifier]->translation == null) {
45
-                throw new TranslationNotFoundException("The translation for identifier '".$identifier."' and locale '".$this->locale."' could not be found");
45
+                throw new TranslationNotFoundException("The translation for identifier '" . $identifier . "' and locale '" . $this->locale . "' could not be found");
46 46
             }
47 47
             return $this->translations[$identifier]->translation;
48 48
         } else {
49
-            throw new NotFoundResourceException("The translation identifier '".$identifier."' could not be found");
49
+            throw new NotFoundResourceException("The translation identifier '" . $identifier . "' could not be found");
50 50
         }
51 51
     }
52 52
 
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     public function refreshCache()
59 59
     {
60 60
         $translations = new TranslationIdentifier();
61
-        $translations = $translations->leftJoin('translations', function ($join)
61
+        $translations = $translations->leftJoin('translations', function($join)
62 62
             {
63
-                $join->on( 'translation_identifiers.id', '=', 'translations.translation_identifier_id')
63
+                $join->on('translation_identifiers.id', '=', 'translations.translation_identifier_id')
64 64
                     ->where('locale', $this->locale);
65 65
             }
66 66
             )->get();
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
      */
99 99
     function getDatabaseID($identifier)
100 100
     {
101
-        if(isset($this->translations[$identifier])) {
101
+        if (isset($this->translations[$identifier])) {
102 102
             return $this->translations[$identifier]->id;
103 103
         } else {
104
-            throw new NotFoundResourceException("The translation identifier '".$identifier."' could not be found");
104
+            throw new NotFoundResourceException("The translation identifier '" . $identifier . "' could not be found");
105 105
         }
106 106
     }
107 107
 }
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @param string $locale The locale of the translations
24 24
      */
25
-    public function __construct($locale)
26
-    {
25
+    public function __construct($locale) {
27 26
         parent::__construct($locale);
28 27
 
29 28
         $this->refreshCache();
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      * @throws TranslationNotFoundException
39 38
      * @return string returns the found translation for identifier
40 39
      */
41
-    public function getTranslation($identifier, $group)
42
-    {
40
+    public function getTranslation($identifier, $group) {
43 41
         if (isset($this->translations[$identifier])) {
44 42
             if ($this->translations[$identifier]->translation == null) {
45 43
                 throw new TranslationNotFoundException("The translation for identifier '".$identifier."' and locale '".$this->locale."' could not be found");
@@ -55,11 +53,9 @@  discard block
 block discarded – undo
55 53
      *
56 54
      * @return void
57 55
      */
58
-    public function refreshCache()
59
-    {
56
+    public function refreshCache() {
60 57
         $translations = new TranslationIdentifier();
61
-        $translations = $translations->leftJoin('translations', function ($join)
62
-            {
58
+        $translations = $translations->leftJoin('translations', function ($join) {
63 59
                 $join->on( 'translation_identifiers.id', '=', 'translations.translation_identifier_id')
64 60
                     ->where('locale', $this->locale);
65 61
             }
@@ -76,8 +72,7 @@  discard block
 block discarded – undo
76 72
      * @param string $group Group of the translations to return
77 73
      * @return array Translations of the given group
78 74
      */
79
-    public function getAllTranslations($group = 'default')
80
-    {
75
+    public function getAllTranslations($group = 'default') {
81 76
         $return = [];
82 77
         foreach (collect($this->translations)->where('group', $group) as $key => $translation) {
83 78
             if ($translation->translation == null) {
@@ -96,8 +91,7 @@  discard block
 block discarded – undo
96 91
      * @throws NotFoundResourceException
97 92
      * @return integer
98 93
      */
99
-    function getDatabaseID($identifier)
100
-    {
94
+    function getDatabaseID($identifier) {
101 95
         if(isset($this->translations[$identifier])) {
102 96
             return $this->translations[$identifier]->id;
103 97
         } else {
Please login to merge, or discard this patch.
src/Commands/ClearUnusedTranslationsCommand.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
                     $this->warn('\''.$identifier.'\' is used in: \''. $file->getPath().'\'!');
136 136
 
137 137
                     foreach ($matches[0] as $match) {
138
-                         $this->warn($match);
138
+                            $this->warn($match);
139 139
                     }
140 140
                     $found = true;
141 141
                     $this->bar->display();
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -56,21 +56,21 @@  discard block
 block discarded – undo
56 56
 
57 57
         foreach ($aDB as $identifier) {
58 58
 
59
-            if(!in_array($identifier->identifier, $aFiles)) {
59
+            if (!in_array($identifier->identifier, $aFiles)) {
60 60
 
61 61
                 $found_as_plain = $this->verifyMissing($identifier->identifier);
62 62
 
63 63
                 $this->line('');
64 64
 
65 65
                 if ($found_as_plain) {
66
-                    $this->warn('\''.$identifier->identifier.'\' was not found withing Translator directives');
66
+                    $this->warn('\'' . $identifier->identifier . '\' was not found withing Translator directives');
67 67
                     $found_plain++;
68 68
                 } else {
69
-                    $this->line('\''.$identifier->identifier.'\' seems to be not used anymore');
69
+                    $this->line('\'' . $identifier->identifier . '\' seems to be not used anymore');
70 70
                     $not_used++;
71 71
                 }
72 72
 
73
-                $task = $this->choice('What do you want me to do?', ['Nothing' ,'Remove'], 0);
73
+                $task = $this->choice('What do you want me to do?', ['Nothing', 'Remove'], 0);
74 74
 
75 75
                 if ($task === 'Remove') {
76 76
                     $identifier->delete();
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
             }
81 81
         }
82 82
         
83
-        $this->table(['Num', 'Identifier'],[
84
-            [$this->found_identifier,  "In DB"],
85
-            [$not_used,     "Not Found"],
86
-            [$found_plain,  "Found Plain"],
87
-            [$removed,  "Removed"],
83
+        $this->table(['Num', 'Identifier'], [
84
+            [$this->found_identifier, "In DB"],
85
+            [$not_used, "Not Found"],
86
+            [$found_plain, "Found Plain"],
87
+            [$removed, "Removed"],
88 88
         ]);
89 89
         
90
-        $this->info($not_used.' Translations no longer used.');
90
+        $this->info($not_used . ' Translations no longer used.');
91 91
         $this->line('');
92 92
 
93 93
         $this->info('Finished in: ' . number_format(microtime(true) - $start, 2) . 'sec');
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
             'resources/assets/js',
110 110
         ];
111 111
 
112
-        foreach($folders as $folder){
113
-            $aFiles = array_merge($aFiles, File::allFiles(base_path().'/'.$folder));
112
+        foreach ($folders as $folder) {
113
+            $aFiles = array_merge($aFiles, File::allFiles(base_path() . '/' . $folder));
114 114
         }
115 115
 
116 116
         $num_files = count($aFiles);
117 117
 
118 118
         $this->bar = $this->output->createProgressBar($num_files);
119
-        $this->bar->setMessage('Analyzing '.$num_files.' files');
119
+        $this->bar->setMessage('Analyzing ' . $num_files . ' files');
120 120
         $this->bar->setFormat('very_verbose');
121 121
 
122 122
         $pattern = preg_quote($identifier, '/');
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
 
128 128
             $extension = $file->getExtension();
129 129
 
130
-            if(in_array($extension, $valid_extensions)){
130
+            if (in_array($extension, $valid_extensions)) {
131 131
 
132 132
                 $content = file_get_contents($file);
133
-                if (preg_match_all($pattern, $content, $matches)){
133
+                if (preg_match_all($pattern, $content, $matches)) {
134 134
                     $this->bar->clear();
135
-                    $this->warn('\''.$identifier.'\' is used in: \''. $file->getPath().'\'!');
135
+                    $this->warn('\'' . $identifier . '\' is used in: \'' . $file->getPath() . '\'!');
136 136
 
137 137
                     foreach ($matches[0] as $match) {
138 138
                          $this->warn($match);
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
             'js'        => '/\$filter\(\'translate\'\)\(\'(?\'identifier\'.*?)\'\)/'
161 161
         ];
162 162
 
163
-        foreach($this->folders as $folder){
164
-            $aFiles = array_merge($aFiles, File::allFiles(base_path().'/'.$folder));
163
+        foreach ($this->folders as $folder) {
164
+            $aFiles = array_merge($aFiles, File::allFiles(base_path() . '/' . $folder));
165 165
         }
166 166
 
167 167
         //TranslatorFacade::setLocale('de_DE');
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
         $num_files = count($aFiles);
170 170
 
171 171
         $this->bar = $this->output->createProgressBar($num_files);
172
-        $this->bar->setMessage('Analyzing '.$num_files.' files');
172
+        $this->bar->setMessage('Analyzing ' . $num_files . ' files');
173 173
         $this->bar->setFormat('very_verbose');
174 174
 
175 175
         foreach ($aFiles as $file) {
176 176
 
177 177
             $extension = $file->getExtension();
178 178
 
179
-            if(in_array($extension, $this->extensions)){
179
+            if (in_array($extension, $this->extensions)) {
180 180
                 $content = file_get_contents($file);
181 181
 
182 182
                 foreach ($regexes as $key => $regex) {
183 183
                     preg_match_all($regex, $content, $result, PREG_SET_ORDER);
184 184
 
185
-                    if(!empty($result[0])){
185
+                    if (!empty($result[0])) {
186 186
                         foreach ($result as $item) {
187 187
                             $this->found_identifier++;
188 188
                             $return[] = $item['identifier'];
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         $this->bar->finish();
197 197
         $this->line('');
198 198
 
199
-        $this->info($this->found_identifier.' Translations found.');
199
+        $this->info($this->found_identifier . ' Translations found.');
200 200
 
201 201
         return $return;
202 202
     }
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @return TranslationIdentifier|\Illuminate\Database\Eloquent\Collection|static[]
208 208
      */
209
-    private function loadFromDB () {
209
+    private function loadFromDB() {
210 210
         // Get all Texts with translations for the given locale
211
-        $trans_identifier =   TranslationIdentifier::select(['id', 'identifier'])->get();
211
+        $trans_identifier = TranslationIdentifier::select(['id', 'identifier'])->get();
212 212
 
213 213
         return $trans_identifier;
214 214
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,8 @@  discard block
 block discarded – undo
8 8
 use Illuminate\Support\Facades\File;
9 9
 use Illuminate\Console\Command;
10 10
 
11
-class ClearUnusedTranslationsCommand extends Command {
11
+class ClearUnusedTranslationsCommand extends Command
12
+{
12 13
 
13 14
     /**
14 15
      * The name and signature of the console command.
@@ -109,7 +110,7 @@  discard block
 block discarded – undo
109 110
             'resources/assets/js',
110 111
         ];
111 112
 
112
-        foreach($folders as $folder){
113
+        foreach($folders as $folder) {
113 114
             $aFiles = array_merge($aFiles, File::allFiles(base_path().'/'.$folder));
114 115
         }
115 116
 
@@ -160,7 +161,7 @@  discard block
 block discarded – undo
160 161
             'js'        => '/\$filter\(\'translate\'\)\(\'(?\'identifier\'.*?)\'\)/'
161 162
         ];
162 163
 
163
-        foreach($this->folders as $folder){
164
+        foreach($this->folders as $folder) {
164 165
             $aFiles = array_merge($aFiles, File::allFiles(base_path().'/'.$folder));
165 166
         }
166 167
 
Please login to merge, or discard this patch.
src/migrations/2017_11_27_162357_create_translator_tables.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         DB::beginTransaction();
27 27
 
28 28
         // Create table for storing roles
29
-        Schema::create('translation_identifiers', function (Blueprint $table)
29
+        Schema::create('translation_identifiers', function(Blueprint $table)
30 30
         {
31 31
             $table->increments('id')->unique();
32 32
             $table->text('identifier');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         });
42 42
 
43 43
         // Create table for storing roles
44
-        Schema::create('translations', function (Blueprint $table)
44
+        Schema::create('translations', function(Blueprint $table)
45 45
         {
46 46
             $table->integer('translation_identifier_id')->unsigned();
47 47
             $table->foreign('translation_identifier_id')->references('id')->on('translation_identifiers')->onDelete('cascade')->onUpdate('no action');
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,13 +21,11 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @return void
23 23
      */
24
-    public function up()
25
-    {
24
+    public function up() {
26 25
         DB::beginTransaction();
27 26
 
28 27
         // Create table for storing roles
29
-        Schema::create('translation_identifiers', function (Blueprint $table)
30
-        {
28
+        Schema::create('translation_identifiers', function (Blueprint $table) {
31 29
             $table->increments('id')->unique();
32 30
             $table->text('identifier');
33 31
 
@@ -41,8 +39,7 @@  discard block
 block discarded – undo
41 39
         });
42 40
 
43 41
         // Create table for storing roles
44
-        Schema::create('translations', function (Blueprint $table)
45
-        {
42
+        Schema::create('translations', function (Blueprint $table) {
46 43
             $table->integer('translation_identifier_id')->unsigned();
47 44
             $table->foreign('translation_identifier_id')->references('id')->on('translation_identifiers')->onDelete('cascade')->onUpdate('no action');
48 45
 
@@ -64,8 +61,7 @@  discard block
 block discarded – undo
64 61
      *
65 62
      * @return void
66 63
      */
67
-    public function down()
68
-    {
64
+    public function down() {
69 65
         Schema::drop('translations');
70 66
         Schema::drop('translation_identifiers');
71 67
     }
Please login to merge, or discard this patch.