Skip to content

ValidationInterface run method $data attribute should be nullable #1833

Description

@d4mn

name: Improvement

Describe the bug
Some inetlisence engines gives me an error when i use $vvalidation->withRequest($this->request)->run() without any parameters because in the ValidationInterface $data attribute is not nullable or not not set with default.

CodeIgniter 4 version
Codeigniter 4 Beta 1

Affected module(s)
ValidationInterface

Expected behavior, and steps to reproduce if appropriate
Intelisence should not show an error on this method without any attributes.
Proposed solution just to set empty array.
public function run(array $data = [], string $group = null): bool;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions