Skip to content

Commit

Permalink
Update dependency mediawiki/mediawiki-codesniffer to v38 (#5)
Browse files Browse the repository at this point in the history
* Update dependency mediawiki/mediawiki-codesniffer to v38
* phpcs: fix linting issues in PHP files

fixes issues in `src/DataUrlParser.php` and `src/DataUrl.php`:
 - PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeColon

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Samantha <[email protected]>
  • Loading branch information
3 people authored Jan 30, 2022
1 parent 59dfd18 commit 981e2e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"neoncitylights/media-type": "^1.0"
},
"require-dev": {
"mediawiki/mediawiki-codesniffer": "35.0.0",
"mediawiki/mediawiki-codesniffer": "38.0.0",
"mediawiki/minus-x": "1.1.1",
"php-parallel-lint/php-console-highlighter": "0.5.0",
"php-parallel-lint/php-parallel-lint": "1.3.1",
Expand Down
8 changes: 4 additions & 4 deletions src/DataUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct( MediaType $mediaType, string $data ) {
*
* @return MediaType
*/
public function getMediaType() : MediaType {
public function getMediaType(): MediaType {
return $this->mediaType;
}

Expand All @@ -43,7 +43,7 @@ public function getMediaType() : MediaType {
*
* @return string
*/
public function getData() : string {
public function getData(): string {
return $this->data;
}

Expand All @@ -52,7 +52,7 @@ public function getData() : string {
*
* @return string
*/
public function getDecodedValue() : string {
public function getDecodedValue(): string {
if ( $this->decodedValue !== null ) {
return $this->decodedValue;
}
Expand All @@ -66,7 +66,7 @@ public function getDecodedValue() : string {
*
* @return string
*/
public function __toString() : string {
public function __toString(): string {
return sprintf(
'%s%s%s%s%s',
self::TOKEN_DATA_SCHEME,
Expand Down
6 changes: 3 additions & 3 deletions src/DataUrlParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DataUrlParser implements DataUrlToken {
* @return DataUrl
* @throws InvalidDataUrlSyntaxException
*/
public function parse( string $dataUrl ) : DataUrl {
public function parse( string $dataUrl ): DataUrl {
$trimmedDataUrl = trim( $dataUrl );

if ( empty( $trimmedDataUrl ) ) {
Expand Down Expand Up @@ -65,7 +65,7 @@ public function parse( string $dataUrl ) : DataUrl {
* @param string $content
* @return MediaType
*/
private function parseMediaTypeAndBase64( string $content ) : MediaType {
private function parseMediaTypeAndBase64( string $content ): MediaType {
$base64ExtIndex = strrpos( $content, self::TOKEN_BASE64_EXT );
if ( is_int( $base64ExtIndex ) ) {
$mediaTypeString = substr( $content, 0, $base64ExtIndex );
Expand All @@ -79,7 +79,7 @@ private function parseMediaTypeAndBase64( string $content ) : MediaType {
* @param string $mediaTypeString
* @return MediaType
*/
private function getMediaType( string $mediaTypeString ) : MediaType {
private function getMediaType( string $mediaTypeString ): MediaType {
if ( empty( $mediaTypeString ) ) {
return new MediaType( 'text', 'plain', [ 'charset' => 'US-ASCII', ] );
}
Expand Down

0 comments on commit 981e2e3

Please sign in to comment.