Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
abdumu authored and StyleCIBot committed Mar 13, 2018
1 parent 2cdbc34 commit 6a9d0bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/StrHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,19 @@ function () use ($methodName, $arguments) {
$mb_parse_str = function_exists('mb_parse_str') ? 'mb_parse_str' : 'parse_str';

$mb_parse_str($this->currentString, $result);

return $result;
} elseif ($snake_method_name === 'strlen') {
return $this->count();
} elseif ($snake_method_name === 'equal' && sizeof($arguments)) {
foreach($arguments as $arg) {
if($this->currentString !== $arg) {
} elseif ($snake_method_name === 'equal' && count($arguments)) {
foreach ($arguments as $arg) {
if ($this->currentString !== $arg) {
return false;
}
}

return true;
} elseif ($snake_method_name === 'contains' && sizeof($arguments)) {
} elseif ($snake_method_name === 'contains' && count($arguments)) {
foreach ($arguments as $arg) {
$mb_strpos = function_exists('mb_strpos') ? 'mb_strpos' : 'strpos';

Expand All @@ -184,7 +185,7 @@ function () use ($methodName, $arguments) {
}
});
} elseif (function_exists($snake_method_name)) {
if(function_exists('mb_'.$snake_method_name)) {
if (function_exists('mb_'.$snake_method_name)) {
$snake_method_name = 'mb_'.$snake_method_name;
}

Expand Down
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Awssat\StrHelper\StrHelper;

if (! function_exists('str')) {
if (!function_exists('str')) {
/**
* A flexible & powerful string manipulation helper for PHP.
*
Expand Down

0 comments on commit 6a9d0bd

Please sign in to comment.