Apply fixes from StyleCI
This commit is contained in:
parent
0b325d6f62
commit
03eb1459ee
|
|
@ -10,10 +10,10 @@ class ProfaneServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
$this->loadTranslationsFrom(__DIR__ . '/lang', 'laravel-profane');
|
$this->loadTranslationsFrom(__DIR__.'/lang', 'laravel-profane');
|
||||||
|
|
||||||
$this->publishes([
|
$this->publishes([
|
||||||
__DIR__ . '/lang' => resource_path('lang/vendor/laravel-profane'),
|
__DIR__.'/lang' => resource_path('lang/vendor/laravel-profane'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Rule for caseless content matching
|
// Rule for caseless content matching
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ class ProfaneValidator
|
||||||
/**
|
/**
|
||||||
* Method to extends to Validation Service.
|
* Method to extends to Validation Service.
|
||||||
*
|
*
|
||||||
* @param string $attribute
|
* @param string $attribute
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
@ -44,9 +44,9 @@ class ProfaneValidator
|
||||||
/**
|
/**
|
||||||
* Method to extends to Validation Service for strict word matching.
|
* Method to extends to Validation Service for strict word matching.
|
||||||
*
|
*
|
||||||
* @param string $attribute
|
* @param string $attribute
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ class Str
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static function containsCaseless($haystack, $needles, $strict = false)
|
public static function containsCaseless($haystack, $needles, $strict = false)
|
||||||
{
|
{
|
||||||
foreach ((array) $needles as $needle) {
|
foreach ((array) $needles as $needle) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ class StrTest extends TestCase
|
||||||
$this->assertTrue(Str::containsCaseless('Theorem Analisys', 'anal', false));
|
$this->assertTrue(Str::containsCaseless('Theorem Analisys', 'anal', false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function test_text_contains_the_same_insensitive_match_from_string()
|
public function test_text_contains_the_same_insensitive_match_from_string()
|
||||||
{
|
{
|
||||||
$this->assertTrue(Str::containsCaseless('Fuck! This class is so bad!', 'Fuck'));
|
$this->assertTrue(Str::containsCaseless('Fuck! This class is so bad!', 'Fuck'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue