@@ -10,6 +10,10 @@ discard block |
||
| 10 | 10 | protected $bigger; |
| 11 | 11 | protected $size; |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param integer $smaller |
|
| 15 | + * @param integer $bigger |
|
| 16 | + */ |
|
| 13 | 17 | public function __construct($smaller, $bigger) |
| 14 | 18 | { |
| 15 | 19 | $this->smaller = $smaller; |
@@ -21,7 +25,7 @@ discard block |
||
| 21 | 25 | * Valide la range de l'occurence |
| 22 | 26 | * |
| 23 | 27 | * @param integer $value |
| 24 | - * @return integer |
|
| 28 | + * @return boolean |
|
| 25 | 29 | */ |
| 26 | 30 | public function validate($value) |
| 27 | 31 | { |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * Valide la range de l'occurence |
| 21 | 21 | * |
| 22 | 22 | * @param integer $value |
| 23 | - * @return integer |
|
| 23 | + * @return boolean |
|
| 24 | 24 | */ |
| 25 | 25 | public function validate($value) |
| 26 | 26 | { |
@@ -8,6 +8,9 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | protected $size; |
| 10 | 10 | |
| 11 | + /** |
|
| 12 | + * @param integer $size |
|
| 13 | + */ |
|
| 11 | 14 | public function __construct($size) |
| 12 | 15 | { |
| 13 | 16 | $this->size = $size; |
@@ -17,7 +20,7 @@ discard block |
||
| 17 | 20 | * Valide la range de l'occurence |
| 18 | 21 | * |
| 19 | 22 | * @param integer $value |
| 20 | - * @return integer |
|
| 23 | + * @return boolean |
|
| 21 | 24 | */ |
| 22 | 25 | public function validate($value) |
| 23 | 26 | { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function score($password, array $criterias) |
| 36 | 36 | { |
| 37 | - $criteriasPassed = array_filter($criterias, function ($criteria) use ($password) { |
|
| 37 | + $criteriasPassed = array_filter($criterias, function($criteria) use ($password) { |
|
| 38 | 38 | return $criteria->passes($password); |
| 39 | 39 | }); |
| 40 | 40 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function passed($password, array $criterias) |
| 45 | 45 | { |
| 46 | - $criteriasPassed = array_map(function ($criteria) use ($password) { |
|
| 46 | + $criteriasPassed = array_map(function($criteria) use ($password) { |
|
| 47 | 47 | |
| 48 | 48 | return [ |
| 49 | 49 | 'name' => $criteria->getName(), |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | public function setName($name) |
| 27 | 27 | { |
| 28 | 28 | if (! $name) { |
| 29 | - $name = $this->dictionary->getName() . '_' . $this->occurrence->getName(); |
|
| 29 | + $name = $this->dictionary->getName() . '_' . $this->occurrence->getName(); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return $this->name = $name; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function setName($name) |
| 27 | 27 | { |
| 28 | - if (! $name) { |
|
| 28 | + if (!$name) { |
|
| 29 | 29 | $name = $this->dictionary->getName() . '_' . $this->occurrence->getName(); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $tmp = []; |
| 41 | 41 | |
| 42 | - for ($i=0; $i < $size; $i++) { |
|
| 42 | + for ($i = 0; $i < $size; $i++) { |
|
| 43 | 43 | shuffle($dictionary); |
| 44 | 44 | |
| 45 | 45 | $tmp[] = $dictionary[0]; |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function handle() |
| 10 | 10 | { |
| 11 | - return ['à','á','â','ã','ä','å','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ù','ú','û','ü','ý']; |
|
| 11 | + return ['à', 'á', 'â', 'ã', 'ä', 'å', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý']; |
|
| 12 | 12 | } |
| 13 | 13 | } |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function handle() |
| 10 | 10 | { |
| 11 | - return ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; |
|
| 11 | + return ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']; |
|
| 12 | 12 | } |
| 13 | 13 | } |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function handle() |
| 10 | 10 | { |
| 11 | - return [0,1,2,3,4,5,6,7,8,9]; |
|
| 11 | + return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; |
|
| 12 | 12 | } |
| 13 | 13 | } |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function handle() |
| 10 | 10 | { |
| 11 | - return ['[','&','+','#','|','^','°','=','!','@','%','*','?','_','~','-','§',':',';','.',']','\\','/']; |
|
| 11 | + return ['[', '&', '+', '#', '|', '^', '°', '=', '!', '@', '%', '*', '?', '_', '~', '-', '§', ':', ';', '.', ']', '\\', '/']; |
|
| 12 | 12 | } |
| 13 | 13 | } |