for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by PhpStorm.
* User: alex
* Date: 9/05/20
* Time: 3:56 AM
*/
namespace POData;
/** To enable the dependency tree to get pruned (and drop illuminate/http and illuminate/support), the fragments of
/* illuminate/support we were using have been copied here.
class StringUtility
{
* Get the plural form of an English word.
*
* @param string $value
* @param int $count
* @return string
public static function plural($value, $count = 2)
return Pluralizer::plural($value, $count);
}
* Determine if a given string starts with a given substring.
* @param string $haystack
* @param string|array $needles
* @return bool
public static function startsWith($haystack, $needles)
foreach ((array) $needles as $needle) {
if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) {
return true;
return false;
* Determine if a given string contains a given substring.
public static function contains($haystack, $needles)
if ($needle !== '' && mb_strpos($haystack, $needle) !== false) {