Skip to content

Some lines are ignored #26

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

Open
1 task
clebail opened this issue Oct 28, 2024 · 0 comments
Open
1 task

Some lines are ignored #26

clebail opened this issue Oct 28, 2024 · 0 comments

Comments

@clebail
Copy link

clebail commented Oct 28, 2024

[

Bug Description

Given the following reproduction Scenario

The issue happens when running this command:

./vendor/bin/var-dump-check --no-colors --custom-function VarDumper::dump,VarDumper::dd  --exclude app/classe/VarDumper.php app

... over a file containing this code:

<?php
use app\classe\VarDumper;

switch('test') {
    case 'test':
        app\classe\VarDumper::dd("Bonjour");
        VarDumper::dd("Bonjour");
        //app\classe\VarDumper::dump("Bonjour");
        VarDumper::dump("Bonjour");
        break;
}

I'd expect the following behaviour

------------------------------------------------------------
Forgotten dump 'VarDumper' found in app/testVD.php:6
    4| switch('test') {
    5|     case 'test':
  > 6|         app\classe\VarDumper::dd("Bonjour");
    7|         VarDumper::dd("Bonjour");
    8|         //app\classe\VarDumper::dump("Bonjour");
------------------------------------------------------------
Forgotten dump 'VarDumper' found in app/testVD.php:7
    5|     case 'test':
    6|         app\classe\VarDumper::dd("Bonjour");
  > 7|         VarDumper::dd("Bonjour");
    8|         //app\classe\VarDumper::dump("Bonjour");
    9|         VarDumper::dump("Bonjour");
    ------------------------------------------------------------
Forgotten dump 'VarDumper' found in app/testVD.php:9
    5|     case 'test':
    6|         app\classe\VarDumper::dd("Bonjour");
    7|         VarDumper::dd("Bonjour");
    8|         //app\classe\VarDumper::dump("Bonjour");
  > 9|         VarDumper::dump("Bonjour");

Instead this happened

------------------------------------------------------------
Forgotten dump 'VarDumper' found in app/testVD.php:6
    4| switch('test') {
    5|     case 'test':
  > 6|         app\classe\VarDumper::dd("Bonjour");
    7|         VarDumper::dd("Bonjour");
    8|         //app\classe\VarDumper::dump("Bonjour");
------------------------------------------------------------
Forgotten dump 'VarDumper' found in app/testVD.php:7
    5|     case 'test':
    6|         app\classe\VarDumper::dd("Bonjour");
  > 7|         VarDumper::dd("Bonjour");
    8|         //app\classe\VarDumper::dump("Bonjour");
    9|         VarDumper::dump("Bonjour");

Environment

Linux 6.2.0-39-generic on Rocky Linux 8.9 (Green Obsidian)
PHP 7.4.33 (cli) (built: Apr 10 2024 09:31:08) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans

Additional Context (optional)

Tested Against main branch?

  • I have verified the issue still exists in the main branch of this package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant