Skip to content

Commit

Permalink
Fix various phpcs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
addwiki-ci committed Jan 26, 2021
1 parent cddd7b7 commit b00df0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
<?xml version="1.0"?>
<ruleset name="MediaWiki">
<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.ControlStructures.DisallowYodaConditions.Found" />
<exclude name="Generic.PHP.SAPIUsage.FunctionFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.NoParamType" />
<exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" />
<exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.PHP71Features.VoidReturnType.NotAllowed" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.is_resource" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.passthru" />
<exclude name="MediaWiki.Usage.InArrayUsage.Found" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>

<rule ref="Generic.Files.LineLength">
Expand Down
2 changes: 1 addition & 1 deletion src/MediawikiApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ private function getUserAgent() {
}

/**
* @param $result
* @param array $result
*/
private function logWarnings( $result ) {
if ( is_array( $result ) ) {
Expand Down
4 changes: 2 additions & 2 deletions src/MediawikiSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private function reallyGetToken( $type ) {
// If mw<1.25 (no new module)
$metaWarning = "Unrecognized value for parameter 'meta': tokens";
if ( isset( $result['warnings']['query']['*'] )
&& false !== strpos( $result['warnings']['query']['*'], $metaWarning ) ) {
&& strpos( $result['warnings']['query']['*'], $metaWarning ) !== false ) {
$this->usePre125TokensModule = true;
$this->logger->log( LogLevel::DEBUG, 'Falling back to pre 1.25 token system' );
$this->tokens[$type] = $this->reallyGetPre125Token( $type );
Expand Down Expand Up @@ -141,7 +141,7 @@ private function getNewTokenType( $type ) {
/**
* Tries to guess an old token type from a new token type
*
* @param $type
* @param string $type
*
* @return string
*/
Expand Down

0 comments on commit b00df0d

Please sign in to comment.