Comments added in validator file methods

This commit is contained in:
Dorian Neto 2017-09-26 18:36:06 -03:00
parent e61adc9066
commit c51d2fc672
1 changed files with 20 additions and 1 deletions

View File

@ -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/';