Cast API timeSpentBackend to an int
[lhc/web/wiklou.git] / includes / api / ApiOpenSearch.php
index 7a7d8f5..effa520 100644 (file)
@@ -338,8 +338,7 @@ class ApiOpenSearch extends ApiBase {
                        return trim( $matches[1] );
                } else {
                        // Just return the first line
-                       $lines = explode( "\n", $text );
-                       return trim( $lines[0] );
+                       return trim( explode( "\n", $text )[0] );
                }
        }
 
@@ -359,7 +358,7 @@ class ApiOpenSearch extends ApiBase {
 
                $ns = implode( '|', SearchEngine::defaultNamespaces() );
                if ( !$ns ) {
-                       $ns = "0";
+                       $ns = '0';
                }
 
                switch ( $type ) {