mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-07-27 16:07:45 -07:00
Removed last phpstan errors
This commit is contained in:
+14
-1
@@ -24,6 +24,8 @@ parameters:
|
||||
enabled: false
|
||||
noNamedArgument:
|
||||
enabled: false
|
||||
noParameterWithContainerTypeDeclaration:
|
||||
enabled: false
|
||||
paths:
|
||||
- ../app
|
||||
- ../database
|
||||
@@ -36,6 +38,17 @@ parameters:
|
||||
reportUnmatchedIgnoredErrors: true
|
||||
ignoreErrors:
|
||||
# these are actually interesting but not right now:
|
||||
- identifier: staticMethod.dynamicCall
|
||||
- identifier: argument.templateType
|
||||
- identifier: method.childReturnType
|
||||
- identifier: instanceof.alwaysFalse
|
||||
- identifier: deadCode.unreachable
|
||||
- identifier: method.dynamicName
|
||||
- identifier: larastan.noEnvCallsOutsideOfConfig
|
||||
- identifier: property.notFound
|
||||
- identifier: arguments.count
|
||||
- identifier: staticMethod.dynamicName
|
||||
- identifier: catch.neverThrown
|
||||
- identifier: notIdentical.alwaysTrue
|
||||
- identifier: method.notFound
|
||||
- identifier: nullsafe.neverNull
|
||||
@@ -90,7 +103,7 @@ parameters:
|
||||
path: ../app/Console/Commands/System/CreatesDatabase.php
|
||||
- identifier: missingType.iterableValue # not interesting enough to fix.
|
||||
- identifier: varTag.type # needs a custom extension for every repository, not gonna happen.
|
||||
- '#Dynamic call to static method Illuminate#'
|
||||
# - '#Dynamic call to static method Illuminate#'
|
||||
# - '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::before#' # is custom scope
|
||||
# - '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::after#' # is custom scope
|
||||
# - '#Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\HasMany::withTrashed#' # is to allow soft delete
|
||||
|
||||
@@ -36,7 +36,6 @@ class NullArrayObject extends ArrayObject
|
||||
*
|
||||
* @param null $default
|
||||
*/
|
||||
/** @phpstan-ignore-next-line */
|
||||
public function __construct(
|
||||
array $array,
|
||||
public $default = null
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ if (!function_exists('envNonEmpty')) {
|
||||
*/
|
||||
function envNonEmpty(string $key, string | int | bool | null $default = null)
|
||||
{
|
||||
$result = env($key, $default); // @phpstan-ignore-line
|
||||
$result = env($key, $default);
|
||||
if ('' === $result) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use FireflyIII\Providers\AccountServiceProvider;
|
||||
use FireflyIII\Providers\AdminServiceProvider;
|
||||
use FireflyIII\Providers\AppServiceProvider;
|
||||
|
||||
@@ -37,7 +37,7 @@ class TransactionTypeSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
/** @var TransactionTypeEnum $type */
|
||||
foreach (TransactionTypeEnum::cases() as $type) { // @phpstan-ignore-line
|
||||
foreach (TransactionTypeEnum::cases() as $type) {
|
||||
if (null === TransactionType::where('type', $type->value)->first()) {
|
||||
try {
|
||||
TransactionType::create(['type' => $type->value]);
|
||||
|
||||
@@ -41,7 +41,7 @@ class UserRoleSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
/** @var UserRoleEnum $role */
|
||||
foreach (UserRoleEnum::cases() as $role) { // @phpstan-ignore-line
|
||||
foreach (UserRoleEnum::cases() as $role) {
|
||||
if (null === UserRole::where('title', $role->value)->first()) {
|
||||
try {
|
||||
UserRole::create(['title' => $role->value]);
|
||||
|
||||
Reference in New Issue
Block a user