Removed last phpstan errors

This commit is contained in:
James Cole
2026-03-06 07:55:04 +01:00
parent 419382f9e0
commit 2c997d8d95
6 changed files with 19 additions and 5 deletions
+14 -1
View File
@@ -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
-1
View File
@@ -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
View File
@@ -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;
}
+2
View File
@@ -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;
+1 -1
View File
@@ -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]);
+1 -1
View File
@@ -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]);