Skip to content

Commit 65cbf6d

Browse files
authored
Strict typing applied everywhere (#408)
* Strict typing applied everywhere * Webpack config adjusted * NPM packages checked
1 parent e04c7ee commit 65cbf6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+72
-98
lines changed

includes/Map/HrefLang.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls\Map;
44

includes/MslsAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsAdminBar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsAdminIcon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsAdminIconTaxonomy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsCli.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

55
class MslsCli {
66

77
public static function init(): void {
8-
\WP_CLI::add_command( 'msls', array( __CLASS__, 'msls' ) );
8+
\WP_CLI::add_command( 'msls blog', array( __CLASS__, 'blog' ) );
99
}
1010

11-
public function msls( $args, $assoc_args ): void {
12-
\WP_CLI::line( 'Hello, World!' );
11+
public function blog( $args, $assoc_args ): void {
12+
$locale = $args[0] ?? $assoc_args['locale'] ?? null;
13+
14+
if ( is_null( $locale ) ) {
15+
\WP_CLI::error( 'Please, provide a locale!' );
16+
return;
17+
}
18+
$blog = msls_blog( $locale );
1319
}
1420
}

includes/MslsContentFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsContentTypes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

includes/MslsCustomColumn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare( strict_types=1 );
22

33
namespace lloc\Msls;
44

0 commit comments

Comments
 (0)