HTMLFormField subclasses triggered false positives when phan incorrectly
thought that $this->mOptions was only a boolean.
ReplacementArray $this->data was defined as possibly being boolean, but
in reality that never happened.
Change-Id: I06bae9c9952366ff7927df37373b146d570f4a02
protected $mVFormClass = '';
protected $mHelpClass = false;
protected $mDefault;
+ /**
+ * @var array|bool|null
+ */
protected $mOptions = false;
protected $mOptionsLabelsNotFromMessage = false;
protected $mHideIf = null;
* Wrapper around strtr() that holds replacements
*/
class ReplacementArray {
- private $data = false;
+ private $data = [];
/**
* Create an object with the specified replacement array
* The array should have the same form as the replacement array for strtr()
* @param array $data
*/
- public function __construct( $data = [] ) {
+ public function __construct( array $data = [] ) {
$this->data = $data;
}
* Set the whole replacement array at once
* @param array $data
*/
- public function setArray( $data ) {
+ public function setArray( array $data ) {
$this->data = $data;
}
/**
- * @return array|bool
+ * @return array
*/
public function getArray() {
return $this->data;
"PhanTypeComparisonFromArray",
// approximate error count: 2
"PhanTypeComparisonToArray",
- // approximate error count: 3
- "PhanTypeInvalidRightOperand",
// approximate error count: 1
"PhanTypeMagicVoidWithReturn",
// approximate error count: 218