Comments added in validator file methods
This commit is contained in:
parent
e61adc9066
commit
c51d2fc672
|
|
@ -7,9 +7,15 @@ use Illuminate\Contracts\Validation\Validator;
|
||||||
|
|
||||||
class ProfaneValidator
|
class ProfaneValidator
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* [$badwords description]
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $badwords = [];
|
protected $badwords = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [__construct description]
|
||||||
|
*/
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
// Get default locale string in laravel project
|
// Get default locale string in laravel project
|
||||||
|
|
@ -49,6 +55,10 @@ class ProfaneValidator
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [getBadwords description]
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
public function getBadwords()
|
public function getBadwords()
|
||||||
{
|
{
|
||||||
return $this->badwords;
|
return $this->badwords;
|
||||||
|
|
@ -63,6 +73,11 @@ class ProfaneValidator
|
||||||
$this->badwords = $this->readDictionary($dictionary);
|
$this->badwords = $this->readDictionary($dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [readDictionary description]
|
||||||
|
* @param [type] $dictionary [description]
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
protected function readDictionary($dictionary)
|
protected function readDictionary($dictionary)
|
||||||
{
|
{
|
||||||
$badwords = [];
|
$badwords = [];
|
||||||
|
|
@ -95,6 +110,10 @@ class ProfaneValidator
|
||||||
return $badwords;
|
return $badwords;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [getBaseDictPath description]
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
protected function getBaseDictPath()
|
protected function getBaseDictPath()
|
||||||
{
|
{
|
||||||
return property_exists($this, 'baseDictPath') ? $this->baseDictPath : __DIR__ . DIRECTORY_SEPARATOR .'dict/';
|
return property_exists($this, 'baseDictPath') ? $this->baseDictPath : __DIR__ . DIRECTORY_SEPARATOR .'dict/';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue