Merge "EditPage: Remove separator between cancel and help"
[lhc/web/wiklou.git] / includes / api / ApiRevisionDelete.php
index 9d71a7d..d7bc931 100644 (file)
@@ -47,7 +47,7 @@ class ApiRevisionDelete extends ApiBase {
                }
 
                // Check if user can add tags
-               if ( count( $params['tags'] ) ) {
+               if ( $params['tags'] ) {
                        $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user );
                        if ( !$ableToTag->isOK() ) {
                                $this->dieStatus( $ableToTag );
@@ -116,11 +116,10 @@ class ApiRevisionDelete extends ApiBase {
                }
 
                $list->reloadFromMaster();
-               // @codingStandardsIgnoreStart Avoid function calls in a FOR loop test part
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $item = $list->reset(); $list->current(); $item = $list->next() ) {
                        $data['items'][$item->getId()] += $item->getApiData( $this->getResult() );
                }
-               // @codingStandardsIgnoreEnd
 
                $data['items'] = array_values( $data['items'] );
                ApiResult::setIndexedTagName( $data['items'], 'i' );