PhpStorm 2023.3 Help

Code Inspections in Oracle

This topic lists all PhpStorm code inspections available in Oracle.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settingsĀ  Ctrl+Alt+S.

Inspection

Description

Default Severity

Forward declaration without definition

Reports declarations of procedures and functions that are missing their implementation in code.

In Oracle, you can declare a procedure or a function without its body, and write the implementation later. The inspection will report names of such procedures or functions that are left without implementation.

Example (Oracle):

DECLARE PROCEDURE foo(a int, b varchar2); BEGIN NULL; END;

The foo procedure is declared but is missing implementation. We can add the implementation to get rid of the error.

DECLARE PROCEDURE foo(a int, b varchar2); PROCEDURE foo(a int, b varchar2) IS BEGIN NULL; END; BEGIN NULL; END;

Error Error

Missing body for package/object type specification

Reports package and object type specifications that are missing body declarations.

Package specifications and object types that declare routines as well as package specifications with cursors must have body declarations where those routines and cursors are implemented. Absence of a body leads to a runtime error when routines or cursors are invoked in program code.

Example (Oracle):

CREATE OR REPLACE PACKAGE ppp IS FUNCTION foo(a INT) RETURN INT; END;

Warning Warning

Overloading errors

Reports invalid cases of subprogram overloading in Oracle.

Example (Oracle):

DECLARE SUBTYPE fff IS BINARY_INTEGER; SUBTYPE ggg IS NATURAL; PROCEDURE foo (a IN ggg) IS BEGIN NULL; END; PROCEDURE foo (a IN fff) IS BEGIN NULL; END; BEGIN NULL; END;

You cannot overload subprograms which parameters differ only in subtypes. For example, you cannot overload procedures where one accepts a BINARY INTEGER parameter and the other accepts a NATURAL parameter. For more information about restrictions on procedure overloading, refer to Restrictions on Overloading at docs.oracle.com.

Warning Warning

Last modified: 25 March 2024