Phpinsights: [Insight for Laravel] Verify if there no dd() calls

Created on 9 Apr 2019  路  4Comments  路  Source: nunomaduro/phpinsights

To solve this issue, you should create a pull request adding the Insight described on the title.

Most helpful comment

it is Squiz.PHP.DiscouragedFunctions.forbiddenFunctions in PHPCS

Could we add dump() and extract, compact and list?

All 4 comments

Is there a way to view function call names at the moment? 馃

it is Squiz.PHP.DiscouragedFunctions.forbiddenFunctions in PHPCS

Could we add dump() and extract, compact and list?

Exactly, good idea @szepeviktor.

@pxgamer You just need to add this code:

                ForbiddenFunctionsSniff::class => [
                    'sizeof' => 'count',
                    'delete' => 'unset',
                    // Any other...
                ]

To https://github.com/nunomaduro/phpinsights/blob/c8e1069171bac1c057f08bda73273a5200c4ba6d/src/Application/DefaultPreset.php#L46.

Don't forget to test it locally to see if it works.

I'll take a look at it later, cheers. :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gummibeer picture Gummibeer  路  4Comments

JacekAndrzejewski picture JacekAndrzejewski  路  6Comments

ijpatricio picture ijpatricio  路  3Comments

fluffycondor picture fluffycondor  路  3Comments

dmitryuk picture dmitryuk  路  5Comments