1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-13 16:53:59 +02:00

Merge pull request #45 from GrahamCampbell/cs

CS Fixes
This commit is contained in:
Daniel St. Jules
2014-09-27 09:25:57 -07:00
2 changed files with 6 additions and 7 deletions

View File

@@ -777,7 +777,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
$encoding = $this->encoding;
foreach($needles as $needle) {
foreach ($needles as $needle) {
if ($this->contains($needle, $caseSensitive)) {
return true;
}
@@ -803,7 +803,7 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
$encoding = $this->encoding;
foreach($needles as $needle) {
foreach ($needles as $needle) {
if (!$this->contains($needle, $caseSensitive)) {
return false;
}
@@ -1033,8 +1033,8 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
$end = 0;
$table = array_fill(0, $strLength + 1, array_fill(0, $otherLength + 1, 0));
for ($i = 1; $i <= $strLength; $i++){
for ($j = 1; $j <= $otherLength; $j++){
for ($i = 1; $i <= $strLength; $i++) {
for ($j = 1; $j <= $otherLength; $j++) {
$strChar = mb_substr($stringy->str, $i - 1, 1, $encoding);
$otherChar = mb_substr($otherStr, $j - 1, 1, $encoding);
@@ -1283,7 +1283,6 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
return (json_last_error() === JSON_ERROR_NONE);
}
/**
* Returns true if the string contains only lower case chars, false
* otherwise.

View File

@@ -402,7 +402,7 @@ abstract class CommonTest extends PHPUnit_Framework_TestCase
public function containsAnyProvider()
{
// One needle
$singleNeedle = array_map(function($array) {
$singleNeedle = array_map(function ($array) {
$array[2] = array($array[2]);
return $array;
}, $this->containsProvider());
@@ -440,7 +440,7 @@ abstract class CommonTest extends PHPUnit_Framework_TestCase
public function containsAllProvider()
{
// One needle
$singleNeedle = array_map(function($array) {
$singleNeedle = array_map(function ($array) {
$array[2] = array($array[2]);
return $array;
}, $this->containsProvider());