Page tree
Skip to end of metadata
Go to start of metadata

LISA path length limited to 256 characters

If the LISA (Large Intermediate Storage Area) path for a specific file exceeds 256 characters, violation calculation for this file will fail with message "<filepath> does not exist". This warning will appear in com.castsoftware.plugin*.log file. This is a limitation of PHP itself and not the PHP extenation. To remediate this issue reduce path to the LISA folder where possible.

Due to a limitation in the Universal Analyzer (the "engine" used for PHP analyses), links will be created from any name to any matching name. At a minimum the following rule may be impacted and give erroneous results:

1007004Avoid Methods and Functions with High Fan-In (PHP)
1007006Avoid Methods and Functions with High Fan-Out (PHP)
1007008Avoid JavaScript Functions with High Fan-In (PHP)
1007010Avoid JavaScript Functions with High Fan-Out (PHP)
1007168Avoid using function or method return value that do not have return (PHP)
1007170Avoid function return value ignored (PHP)

Analysis of XML and XSL files contained in the PHP application

The analysis of XML and XSL files contained in the PHP application is not supported. Any links between these files and any other file in the application will not be detected. This will impact the results of all the Quality Rules using these files.

Analysis of very big PHP applications

Very big PHP applications might need to be divided and analyzed in multiple small analyses instead of one analysis for the entire application.  

Support of JavaScript source code

The PHP extension does not support JavaScript and as such, any JavaScript source code located in .PHP or JavaScript  files will not be analyzed. CAST recommends using the HTML5 and JavaScript extension to analyze JavaScript files in the source code.

Support of PHTML files

PHTML files are supported with some limitations. If the files contain calls to functions or methods defined in other files and these other files are not specifically included, then these links will be lost.

Support of UNICODE

Unicode is supported in the current version of PHP Language Pack

Links between PHP and database objects

Calls to database objects from PHP are not typed (for example Us (Use Select), Ui (Use Insert)) - instead all calls are recorded as U links.

If a php class has members declared on the same line, only the first member will be detected. For example:

class Test {

public $first, $second, $third;


After analysis only object for "first" will be created.

Limitations specific to Quality Rules

Avoid artifacts having recursive calls

"Avoid artifacts having recursive calls" (7388 - a standard CAST Quality Rule) - in some cases, a false positive may be detected: a call to a parent function can be detected as a recursive call

Note that an equivalent Quality Rule specific to the PHP extension (Avoid artifacts having recursive calls (PHP) - 1007242) has been added in PHP 1.2.0. This replacement Quality Rule now produces accurate results and the results of 7388 should be ignored.

Avoid using break or continue statements in loops with high cyclomatic complexity

"Avoid using break or continue statements in loops with high cyclomatic complexity" (1007176 - PHP) - if the break statement is located in JavaScript functions, no violations will be detected. JavaScript source code located in .PHP or JavaScript files is not analyzed (see limitation listed above).

  • No labels