Completed
Push — master ( c62883...795ab8 )
by Nicolas
04:44
created
Providers/RouteServiceProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $namespace = 'Modules\Translation\Http\Controllers';
12 12
 
13 13
     /**
14
-     * @return string
14
+     * @return boolean
15 15
      */
16 16
     protected function getFrontendRoute()
17 17
     {
Please login to merge, or discard this patch.
2015_11_20_184604486385_create_translation_translations_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function up()
13 13
     {
14
-        Schema::create('translation__translations', function (Blueprint $table) {
14
+        Schema::create('translation__translations', function(Blueprint $table) {
15 15
             $table->engine = 'InnoDB';
16 16
             $table->increments('id');
17 17
             $table->string('key');
Please login to merge, or discard this patch.
...11_20_184604743083_create_translation_translation_translations_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('translation__translation_translations', function (Blueprint $table) {
15
+        Schema::create('translation__translation_translations', function(Blueprint $table) {
16 16
             $table->engine = 'InnoDB';
17 17
             $table->increments('id');
18 18
             $table->text('value');
19 19
 
20 20
             $table->integer('translation_id')->unsigned();
21 21
             $table->string('locale')->index();
22
-            $table->unique(['translation_id', 'locale'], 'translations_trans_id_locale_unique');
22
+            $table->unique([ 'translation_id', 'locale' ], 'translations_trans_id_locale_unique');
23 23
             $table->foreign('translation_id')->references('id')->on('translation__translations')->onDelete('cascade');
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
Entities/Translation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
     use Translatable;
9 9
 
10 10
     protected $table = 'translation__translations';
11
-    public $translatedAttributes = ['value'];
12
-    protected $fillable = ['key', 'value'];
11
+    public $translatedAttributes = [ 'value' ];
12
+    protected $fillable = [ 'key', 'value' ];
13 13
 }
Please login to merge, or discard this patch.
Entities/TranslationTranslation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 class TranslationTranslation extends Model
6 6
 {
7 7
     public $timestamps = false;
8
-    protected $fillable = ['value'];
8
+    protected $fillable = [ 'value' ];
9 9
     protected $table = 'translation__translation_translations';
10 10
 }
Please login to merge, or discard this patch.
Exporters/TranslationsExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function export()
27 27
     {
28 28
         $data = $this->formatData();
29
-        $keys = array_keys($data[0]);
29
+        $keys = array_keys($data[ 0 ]);
30 30
 
31 31
         $csv = Writer::createFromFileObject(new SplTempFileObject());
32 32
         $csv->insertOne($keys);
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
         $translations = $this->translations->getFileAndDatabaseMergedTranslations();
51 51
         $translations = $translations->all();
52 52
 
53
-        $data = [];
53
+        $data = [ ];
54 54
         foreach ($translations as $key => $translation) {
55
-            $data[] = array_merge(['key' => $key], $translation);
55
+            $data[ ] = array_merge([ 'key' => $key ], $translation);
56 56
         }
57 57
 
58 58
         return $data;
Please login to merge, or discard this patch.
Http/Requests/ImportTranslationsRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     public function rules()
8 8
     {
9 9
         return [
10
-            'file' => ['required', 'extensions:csv'],
10
+            'file' => [ 'required', 'extensions:csv' ],
11 11
         ];
12 12
     }
13 13
 
Please login to merge, or discard this patch.
Http/apiRoutes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,4 +8,4 @@
 block discarded – undo
8 8
     'as' => 'api.translation.translations.update'
9 9
 ]);
10 10
 
11
-post('translation/clearCache', ['uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache']);
11
+post('translation/clearCache', [ 'uses' => 'TranslationController@clearCache', 'as' => 'api.translation.translations.clearCache' ]);
Please login to merge, or discard this patch.
Http/backendRoutes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 /** @var Router $router */
6 6
 
7
-$router->group(['prefix' =>'/translation'], function (Router $router) {
8
-    $router->bind('translations', function ($id) {
7
+$router->group([ 'prefix' =>'/translation' ], function(Router $router) {
8
+    $router->bind('translations', function($id) {
9 9
         return app(\Modules\Translation\Repositories\TranslationRepository::class)->find($id);
10 10
     });
11
-    get('translations', ['uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
-    get('translations/export', ['uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
13
-    post('translations/import', ['uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
11
+    get('translations', [ 'uses' => 'TranslationController@index', 'as' => 'admin.translation.translation.index', ]);
12
+    get('translations/export', [ 'uses' => 'TranslationController@export', 'as' => 'admin.translation.translation.export', ]);
13
+    post('translations/import', [ 'uses' => 'TranslationController@import', 'as' => 'admin.translation.translation.import', ]);
14 14
 });
Please login to merge, or discard this patch.