Completed
Pull Request — master (#7)
by
unknown
14:35
created
src/Comodojo/Zip/Foundation/Utils/UniqueId.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
      * @param int $length
30 30
      * @return string
31 31
      */
32
-    public static function generateCustom($prefix, $length=128) {
32
+    public static function generateCustom($prefix, $length = 128) {
33 33
 
34
-        if ( $length <= (strlen($prefix)+1) ) {
34
+        if ( $length <= (strlen($prefix) + 1) ) {
35 35
             throw new InvalidArgumentException("Uid length cannot be smaller than prefix length +1");
36 36
 
37 37
         }
38 38
 
39
-        return "$prefix-".self::generate($length-(strlen($prefix)+1));
39
+        return "$prefix-".self::generate($length - (strlen($prefix) + 1));
40 40
 
41 41
     }
42 42
 
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
      * @param int $length
47 47
      * @return string
48 48
      */
49
-    public static function generate($length=128) {
49
+    public static function generate($length = 128) {
50 50
 
51
-        if ($length < 32) {
51
+        if ( $length < 32 ) {
52 52
 
53 53
             return substr(self::getUid(), 0, $length);
54 54
 
55
-        } else if ($length == 32) {
55
+        } else if ( $length == 32 ) {
56 56
 
57 57
             return self::getUid();
58 58
 
59
-        }  else {
59
+        } else {
60 60
 
61
-            $numString = (int)($length/32) + 1;
61
+            $numString = (int) ($length / 32) + 1;
62 62
             $randNum = "";
63
-            for ($i = 0; $i < $numString; $i++) $randNum .= self::getUid();
63
+            for ( $i = 0; $i < $numString; $i++ ) $randNum .= self::getUid();
64 64
 
65 65
             return substr($randNum, 0, $length);
66 66
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
             return self::getUid();
58 58
 
59
-        }  else {
59
+        } else {
60 60
 
61 61
             $numString = (int)($length/32) + 1;
62 62
             $randNum = "";
Please login to merge, or discard this patch.
src/Comodojo/Zip/Foundation/Validation/DataFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      * @param int $default Default value
30 30
      * @return int
31 31
      */
32
-    public static function filterInteger($int, $min=~PHP_INT_MAX, $max=PHP_INT_MAX, $default=0) {
32
+    public static function filterInteger($int, $min = ~PHP_INT_MAX, $max = PHP_INT_MAX, $default = 0) {
33 33
 
34 34
         return filter_var($int, FILTER_VALIDATE_INT, array(
35 35
             'options' => array(
Please login to merge, or discard this patch.