Skip to content
Snippets Groups Projects

Resolve #3425412 "Phpstan 2 quick fixes"

Open Dave Long requested to merge issue/drupal-3425412:3425412-phpstan-2-quick-fixes into 11.x
2 unresolved threads

Closes #3425412

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
72 72 /**
73 73 * The account to use for authentication, if any.
74 74 *
75 * @var null|\Drupal\Core\Session\AccountInterface
75 * @var \Drupal\Core\Session\AccountInterface|object{name: \Drupal\Core\Field\FieldItemList, passRaw: string}
  • Wouldn't it make more sense to have an explicit value object class here instead of PHPDoc?

  • Author Maintainer

    This was more just to satisfy PHPStan, the issue is that we are using a real AccountInterface object and then writing an additional property (the raw password) or accessing via the magic getter which isn't on the interface (name). Maybe we could swap to UserInterface for the latter? But unsure how we would handle the raw password without making a bunch more changes, and this is only for tests...

  • Please register or sign in to reply
  • mondrake @mondrake started a thread on the diff
  • 50 50 * (optional) File size in bytes to match. Defaults to NULL, which will not
    51 51 * filter the returned list by size.
    52 52 *
    53 * @return object[]
    53 * @return object{filename: string, name: string, uri: string}[]
    Please register or sign in to reply
    Loading