PhpStorm 2022.1 Help

Code Inspection: Named arguments should be used

Reports arguments that are used without names in routine calls. By default, this inspection is disabled.

For more information about the difference between named and unnamed parameters, see Binding Parameters by Name (Named Parameters) at docs.microsoft.com.

Example (Microsoft SQL Server):

CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS BEGIN RETURN n + m; END; CREATE PROCEDURE test AS BEGIN foo n = 1, m = 2; --- The following call misses parameter names and will be highlighted foo 1, 2; END;

Parameters 1, 2 in the foo 1, 2; call are highlighted because they miss names.

Suppress an inspection in the editor

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 13 May 2022