Completed
Push — master ( 04b60d...503728 )
by paprika
02:12
created
src/MD5HasherProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function register()
25 25
     {
26
-        $this->app->singleton('md5hash',function (){
26
+        $this->app->singleton('md5hash', function() {
27 27
             return new MD5Hasher();
28 28
         });
29 29
     }
Please login to merge, or discard this patch.
src/MD5Hasher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 class MD5Hasher
5 5
 {
6 6
     //对参数设置默认值,可以在不给出参数值时也能让函数通过
7
-    public function make($value,array $options = []){
7
+    public function make($value, array $options = []) {
8 8
         $salt = isset($options['salt']) ? $options['salt'] : '';
9
-        return hash('md5',$value.$salt);
9
+        return hash('md5', $value.$salt);
10 10
     }
11
-    public  function check($value,$hashValue,array $options=[]){
11
+    public  function check($value, $hashValue, array $options = []) {
12 12
         $salt = isset($options['salt']) ? $options['salt'] : '';
13
-        return hash('md5',$value.$salt) === $hashValue;
13
+        return hash('md5', $value.$salt) === $hashValue;
14 14
     }
15 15
 
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.