Skip to content

Commit 4442860

Browse files
committed
🚨 minor fixes to remove warning and php 7.4+ notices
1 parent 2b80868 commit 4442860

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

‎src/Console/bin/bones‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ namespace Bones {
456456
define('WPBONES_MINIMAL_PHP_VERSION', '7.4');
457457

458458
/* MARK: The WP Bones command line version. */
459-
define('WPBONES_COMMAND_LINE_VERSION', '1.8.0');
459+
define('WPBONES_COMMAND_LINE_VERSION', '1.8.1');
460460

461461
use Bones\SemVer\Exceptions\InvalidVersionException;
462462
use Bones\SemVer\Version;
@@ -576,7 +576,7 @@ namespace Bones {
576576
*
577577
* @return mixed|array
578578
*/
579-
protected function arguments(int $index = null): ?array
579+
protected function arguments($index = null)
580580
{
581581
// Check if 'argv' is set in the server variables
582582
if (!isset($_SERVER['argv'])) {
@@ -838,7 +838,7 @@ namespace Bones {
838838
* @param string|null $pluginName
839839
* @return string
840840
*/
841-
public function getMainPluginFile(?string $pluginName = ''): string
841+
public function getMainPluginFile($pluginName = ''): string
842842
{
843843
if (empty($pluginName)) {
844844
$pluginName = $this->getPluginName();
@@ -917,7 +917,7 @@ namespace Bones {
917917
*
918918
* @return bool
919919
*/
920-
protected function isHelp(string $str = null): bool
920+
protected function isHelp($str = null): bool
921921
{
922922
if (!is_null($str)) {
923923
return empty($str) || $str === '--help';
@@ -936,7 +936,7 @@ namespace Bones {
936936
*
937937
* @return array|string
938938
*/
939-
protected function commandParams(int $index = null)
939+
protected function commandParams($index = null)
940940
{
941941
$params = $this->arguments();
942942

@@ -1158,7 +1158,7 @@ namespace Bones {
11581158
*
11591159
* @param string|null $str
11601160
*/
1161-
public function getPluginSlug(string $str = null): string
1161+
public function getPluginSlug($str = null): string
11621162
{
11631163
$str = $this->snakeCasePluginName($str);
11641164

@@ -1171,7 +1171,7 @@ namespace Bones {
11711171
* @param string|null $str
11721172
* @return string
11731173
*/
1174-
public function snakeCasePluginName(string $str = null): string
1174+
public function snakeCasePluginName($str = null): string
11751175
{
11761176
$str = $this->sanitizePluginName($str);
11771177

@@ -1184,7 +1184,7 @@ namespace Bones {
11841184
* @param string|null $str
11851185
* @return string
11861186
*/
1187-
public function sanitizePluginName(string $str = null): string
1187+
public function sanitizePluginName($str = null): string
11881188
{
11891189
if (is_null($str)) {
11901190
$str = $this->getPluginName();
@@ -1226,7 +1226,7 @@ namespace Bones {
12261226
* @param string|null $str
12271227
* @return string
12281228
*/
1229-
public function getPluginVars(string $str = null): string
1229+
public function getPluginVars($str = null): string
12301230
{
12311231
$str = $this->snakeCasePluginName($str);
12321232

@@ -1241,7 +1241,7 @@ namespace Bones {
12411241
*
12421242
* @return string
12431243
*/
1244-
public function getPluginId(string $str = null): string
1244+
public function getPluginId($str = null): string
12451245
{
12461246
return $this->sanitizePluginName($str);
12471247
}
@@ -1701,7 +1701,6 @@ namespace Bones {
17011701
$this->skipWhenDeploy = array_merge($this->skipWhenDeploy, $dontSkipWhenDeploy);
17021702
}
17031703

1704-
17051704
/**
17061705
* Filter the list of files and folders to skip during the deployment.
17071706
*

0 commit comments

Comments
 (0)