And remove the issue from the exclusions list.
Bug: T231636
Change-Id: Iee73ddb554e354abe52d13dcfc453f9a15bb8877
// approximate error count: 45
"PhanTypeMismatchArgument",
- // approximate error count: 693
- "PhanUndeclaredProperty",
] );
// This helps a lot in discovering bad code, but unfortunately it will always fail for
* @param ParserOptions|null $options Either the ParserOption to use or null to only get the
* current ParserOption object. This parameter is deprecated since 1.31.
* @return ParserOptions
+ * @suppress PhanUndeclaredProperty For isBogus
*/
public function parserOptions( $options = null ) {
if ( $options !== null ) {
* ]
*
* @return Status[]
+ * @suppress PhanUndeclaredProperty Status vs StatusValue
*/
public function splitByErrorType() {
list( $errorsOnlyStatus, $warningsOnlyStatus ) = parent::splitByErrorType();
);
if ( $row ) {
$rev = $this->revisionStore->newRevisionFromArchiveRow( $row );
+ // @phan-suppress-next-line PhanUndeclaredProperty
$rev->isArchive = true;
}
}
}
}
+ // @phan-suppress-next-line PhanUndeclaredProperty
if ( !empty( $rev->isArchive ) ) {
$this->getMain()->setCacheMode( 'private' );
$vals["{$prefix}archive"] = true;
* @param OOUI\Widget $inputField
* @param array $config
* @return OOUI\FieldLayout|OOUI\ActionFieldLayout
+ * @suppress PhanUndeclaredProperty Only some subclasses declare mClassWithButton
*/
protected function getFieldLayoutOOUI( $inputField, $config ) {
if ( isset( $this->mClassWithButton ) ) {
* @param File|FSFile $image
* @param string $path
* @return DjVuImage
+ * @suppress PhanUndeclaredProperty Custom property
*/
function getDjVuImage( $image, $path ) {
if ( !$image ) {
* @param File $image
* @param bool $gettext DOCUMENT (Default: false)
* @return bool|SimpleXMLElement
+ * @suppress PhanUndeclaredProperty Custom property
*/
public function getMetaTree( $image, $gettext = false ) {
if ( $gettext && isset( $image->djvuTextTree ) ) {
// Reattach all direct children of the `<svg>` root node to the `<g>` wrapper
while ( $root->firstChild ) {
$node = $root->firstChild;
+ // @phan-suppress-next-line PhanUndeclaredProperty False positive
if ( !$titleNode && $node->nodeType === XML_ELEMENT_NODE && $node->tagName === 'title' ) {
// Remember the first encountered `<title>` node
$titleNode = $node;
$form = HTMLForm::factory( 'ooui', $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( 'delete' )->getLocalURL() );
+ // @phan-suppress-next-line PhanUndeclaredProperty
$form->tagAction = 'delete'; // custom property on HTMLForm object
$form->setSubmitCallback( [ $this, 'processTagForm' ] );
$form->setSubmitTextMsg( 'tags-delete-submit' );
$form = HTMLForm::factory( 'ooui', $fields, $this->getContext() );
$form->setAction( $this->getPageTitle( $actionStr )->getLocalURL() );
+ // @phan-suppress-next-line PhanUndeclaredProperty
$form->tagAction = $actionStr;
$form->setSubmitCallback( [ $this, 'processTagForm' ] );
// tags-activate-submit, tags-deactivate-submit
$form->show();
}
+ /**
+ * @param array $data
+ * @param HTMLForm $form
+ * @return bool
+ * @suppress PhanUndeclaredProperty $form->tagAction
+ */
public function processTagForm( array $data, HTMLForm $form ) {
$context = $form->getContext();
$out = $context->getOutput();
function filterDataForSubmit( $data ) {
foreach ( $this->mFlatFields as $fieldname => $field ) {
if ( $field instanceof HTMLNestedFilterable ) {
+ // @phan-suppress-next-next-line PhanUndeclaredProperty All HTMLForm fields have mParams,
+ // but the instanceof confuses phan, which doesn't support intersections
$info = $field->mParams;
$prefix = $info['prefix'] ?? $fieldname;
foreach ( $field->filterDataForSubmit( $data[$fieldname] ) as $key => $value ) {
* @param LinkTarget $title
*
* @return string
+ * @suppress PhanUndeclaredProperty
*/
public function getPrefixedText( LinkTarget $title ) {
if ( !isset( $title->prefixedText ) ) {
* @return string|string[] An error or list of errors in the
* provided $datum. When no errors exist the empty array is
* returned.
- * @suppress PhanUndeclaredMethod
+ * @suppress PhanUndeclaredMethod,PhanUndeclaredProperty
*/
public static function getErrors( AvroSchema $schema, $datum ) {
switch ( $schema->type ) {
*
* @file
* @ingroup Maintenance
+ * @phan-file-suppress PhanUndeclaredProperty Lots of custom properties
*/
require_once __DIR__ . '/Maintenance.php';