Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dmason30 committed Oct 5, 2023
1 parent 75c2257 commit c41f598
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/translation-linter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

// config for Fidum/LaravelTranslationLinter
return [

];
19 changes: 19 additions & 0 deletions database/migrations/create_translation_linter_table.php.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up()
{
Schema::create('laravel_translation_linter_table', function (Blueprint $table) {
$table->id();

// add fields

$table->timestamps();
});
}
};
19 changes: 19 additions & 0 deletions src/Commands/LaravelTranslationLinterCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Fidum\LaravelTranslationLinter\Commands;

use Illuminate\Console\Command;

class LaravelTranslationLinterCommand extends Command
{
public $signature = 'laravel-translation-linter';

public $description = 'My command';

public function handle(): int
{
$this->comment('All done');

return self::SUCCESS;
}
}
16 changes: 16 additions & 0 deletions src/Facades/LaravelTranslationLinter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Fidum\LaravelTranslationLinter\Facades;

use Illuminate\Support\Facades\Facade;

/**
* @see \Fidum\LaravelTranslationLinter\LaravelTranslationLinter
*/
class LaravelTranslationLinter extends Facade
{
protected static function getFacadeAccessor()
{
return \Fidum\LaravelTranslationLinter\LaravelTranslationLinter::class;
}
}
7 changes: 7 additions & 0 deletions src/LaravelTranslationLinter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Fidum\LaravelTranslationLinter;

class LaravelTranslationLinter
{
}
25 changes: 25 additions & 0 deletions src/LaravelTranslationLinterServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Fidum\LaravelTranslationLinter;

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Fidum\LaravelTranslationLinter\Commands\LaravelTranslationLinterCommand;

class LaravelTranslationLinterServiceProvider extends PackageServiceProvider
{
public function configurePackage(Package $package): void
{
/*
* This class is a Package Service Provider
*
* More info: https://github.com/spatie/laravel-package-tools
*/
$package
->name('laravel-translation-linter')
->hasConfigFile()
->hasViews()
->hasMigration('create_laravel-translation-linter_table')
->hasCommand(LaravelTranslationLinterCommand::class);
}
}

0 comments on commit c41f598

Please sign in to comment.