Skip to content

Commit

Permalink
Merge pull request #15 from awssat/analysis-8LwrvJ
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
abdumu authored Mar 13, 2018
2 parents 2cdbc34 + 6a9d0bd commit 3e12549
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 3e12549

Please sign in to comment.