-
-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
[11.x] New Version
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,30 @@ jobs: | |
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
extensions: bcmath | ||
env: | ||
runner: self-hosted | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: 'Qodana Scan' | ||
uses: JetBrains/[email protected] | ||
env: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
use Bavix\Wallet\Services\DiscountService; | ||
Check notice on line 44 in config/config.php
|
||
use Bavix\Wallet\Services\EagerLoaderService; | ||
Check notice on line 45 in config/config.php
|
||
use Bavix\Wallet\Services\ExchangeService; | ||
Check notice on line 46 in config/config.php
|
||
use Bavix\Wallet\Services\FormatterService; | ||
Check notice on line 47 in config/config.php
|
||
use Bavix\Wallet\Services\PrepareService; | ||
Check notice on line 48 in config/config.php
|
||
use Bavix\Wallet\Services\PurchaseService; | ||
Check notice on line 49 in config/config.php
|
||
use Bavix\Wallet\Services\RegulatorService; | ||
Check notice on line 50 in config/config.php
|
||
|
@@ -110,6 +111,7 @@ | |
'discount' => DiscountService::class, | ||
Check notice on line 111 in config/config.php
|
||
'eager_loader' => EagerLoaderService::class, | ||
Check notice on line 112 in config/config.php
|
||
'exchange' => ExchangeService::class, | ||
Check notice on line 113 in config/config.php
|
||
'formatter' => FormatterService::class, | ||
Check notice on line 114 in config/config.php
|
||
'prepare' => PrepareService::class, | ||
Check notice on line 115 in config/config.php
|
||
'purchase' => PurchaseService::class, | ||
Check notice on line 116 in config/config.php
|
||
'tax' => TaxService::class, | ||
Check notice on line 117 in config/config.php
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Bavix\Wallet\Models\Transfer; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class() extends Migration { | ||
public function up(): void | ||
{ | ||
Schema::dropColumns($this->table(), ['from_type', 'to_type']); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::table($this->table(), static function (Blueprint $table) { | ||
$table->string('from_type') | ||
->after('from_id') | ||
; | ||
$table->string('to_type') | ||
->after('to_id') | ||
; | ||
}); | ||
} | ||
|
||
private function table(): string | ||
{ | ||
return (new Transfer())->getTable(); | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Bavix\Wallet\Models\Transaction; | ||
use Bavix\Wallet\Models\Transfer; | ||
use Bavix\Wallet\Models\Wallet; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class() extends Migration { | ||
public function up(): void | ||
{ | ||
Schema::table((new Wallet())->getTable(), static function (Blueprint $table) { | ||
$table->softDeletesTz(); | ||
}); | ||
Schema::table((new Transfer())->getTable(), static function (Blueprint $table) { | ||
$table->softDeletesTz(); | ||
}); | ||
Schema::table((new Transaction())->getTable(), static function (Blueprint $table) { | ||
$table->softDeletesTz(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::table((new Wallet())->getTable(), static function (Blueprint $table) { | ||
$table->dropSoftDeletes(); | ||
}); | ||
Schema::table((new Transfer())->getTable(), static function (Blueprint $table) { | ||
$table->dropSoftDeletes(); | ||
}); | ||
Schema::table((new Transaction())->getTable(), static function (Blueprint $table) { | ||
$table->dropSoftDeletes(); | ||
}); | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,8 @@ | ||
includes: | ||
- vendor/nunomaduro/larastan/extension.neon | ||
- vendor/ergebnis/phpstan-rules/rules.neon | ||
|
||
parameters: | ||
level: 9 | ||
fileExtensions: | ||
- php | ||
|
||
parametersSchema: | ||
ergebnis: structure([ | ||
allowAbstractClasses: bool() | ||
classesAllowedToBeExtended: listOf(string()) | ||
classesNotRequiredToBeAbstractOrFinal: listOf(string()) | ||
interfacesImplementedByContainers: listOf(string()) | ||
]) | ||
|
||
rules: | ||
- Ergebnis\PHPStan\Rules\Closures\NoNullableReturnTypeDeclarationRule | ||
- Ergebnis\PHPStan\Rules\Closures\NoParameterWithNullableTypeDeclarationRule | ||
- Ergebnis\PHPStan\Rules\Expressions\NoCompactRule | ||
- Ergebnis\PHPStan\Rules\Expressions\NoEmptyRule | ||
- Ergebnis\PHPStan\Rules\Expressions\NoErrorSuppressionRule | ||
- Ergebnis\PHPStan\Rules\Expressions\NoEvalRule | ||
- Ergebnis\PHPStan\Rules\Expressions\NoIssetRule | ||
- Ergebnis\PHPStan\Rules\Files\DeclareStrictTypesRule | ||
- Ergebnis\PHPStan\Rules\Functions\NoNullableReturnTypeDeclarationRule | ||
- Ergebnis\PHPStan\Rules\Functions\NoParameterWithNullableTypeDeclarationRule | ||
- Ergebnis\PHPStan\Rules\Functions\NoParameterWithNullDefaultValueRule | ||
- Ergebnis\PHPStan\Rules\Methods\FinalInAbstractClassRule | ||
- Ergebnis\PHPStan\Rules\Methods\NoConstructorParameterWithDefaultValueRule | ||
- Ergebnis\PHPStan\Rules\Methods\PrivateInFinalClassRule | ||
- Ergebnis\PHPStan\Rules\Statements\NoSwitchRule | ||
|
||
services: | ||
- | ||
class: Ergebnis\PHPStan\Rules\Classes\FinalRule | ||
arguments: | ||
allowAbstractClasses: %ergebnis.allowAbstractClasses% | ||
classesNotRequiredToBeAbstractOrFinal: %ergebnis.classesNotRequiredToBeAbstractOrFinal% | ||
tags: | ||
- phpstan.rules.rule | ||
|
||
- | ||
class: Ergebnis\PHPStan\Rules\Classes\NoExtendsRule | ||
arguments: | ||
classesAllowedToBeExtended: %ergebnis.classesAllowedToBeExtended% | ||
tags: | ||
- phpstan.rules.rule | ||
|
||
- | ||
class: Ergebnis\PHPStan\Rules\Classes\PHPUnit\Framework\TestCaseWithSuffixRule | ||
tags: | ||
- phpstan.rules.rule | ||
|
||
- | ||
class: Ergebnis\PHPStan\Rules\Methods\NoParameterWithContainerTypeDeclarationRule | ||
arguments: | ||
interfacesImplementedByContainers: %ergebnis.interfacesImplementedByContainers% | ||
tags: | ||
- phpstan.rules.rule |