Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel\Nova\Metrics\ValueResult wrong PHPdoc type of $format param #6146

Closed
trippo opened this issue Jan 11, 2024 · 2 comments
Closed

Laravel\Nova\Metrics\ValueResult wrong PHPdoc type of $format param #6146

trippo opened this issue Jan 11, 2024 · 2 comments
Labels
bug Verified bug by the Nova team
Milestone

Comments

@trippo
Copy link

trippo commented Jan 11, 2024

  • Laravel Version: 10.40.0
  • Nova Version: 4.32.11
  • PHP Version: 8.3

Description:

On Laravel\Nova\Metrics\ValueResult class the function format must accept an array|string $format param

/**
 * Set the metric value formatting.
 *
 * @param  string  $format
 * @return $this
 */
public function format($format)
    {
        $this->format = $format;

        return $this;
    }

This is documentation about the format method
image

@trippo trippo changed the title Laravel\Nova\Metrics\ValueResult wrong param $format PHPdoc Laravel\Nova\Metrics\ValueResult wrong PHPdoc type of $format param Jan 11, 2024
@brayann
Copy link

brayann commented Jan 16, 2024

+1 on this. PHPStan is complaining about me passing an array to the format method.

Parameter #1 $format of method Laravel\Nova\Metrics\ValueResult::format() expects string, array<string, int|true> given.

@crynobone crynobone added the bug Verified bug by the Nova team label Feb 12, 2024
@crynobone crynobone added this to the 4.x milestone Feb 13, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team
Projects
None yet
Development

No branches or pull requests

3 participants