@@ -133,7 +133,7 @@ |
||
| 133 | 133 | /** |
| 134 | 134 | * Generate a random string of length. SECURE |
| 135 | 135 | * @param $length |
| 136 | - * @return null|string |
|
| 136 | + * @return string |
|
| 137 | 137 | * @throws \twhiston\twLib\TwLibException if string is generated non securely or result is null |
| 138 | 138 | */ |
| 139 | 139 | static public function String($length) |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | continue; |
| 117 | 117 | } // start over instead of accepting bias |
| 118 | 118 | // else |
| 119 | - $num = $num % $range; // to hell with security |
|
| 119 | + $num = $num % $range; // to hell with security |
|
| 120 | 120 | } |
| 121 | 121 | break; |
| 122 | 122 | } while (true); |
@@ -59,10 +59,10 @@ |
||
| 59 | 59 | * @param \twhiston\twLib\Reference\Reference $point |
| 60 | 60 | * @return mixed|null |
| 61 | 61 | */ |
| 62 | - public function &swap(Reference &$point) |
|
| 62 | + public function &swap(Reference&$point) |
|
| 63 | 63 | { |
| 64 | 64 | |
| 65 | - $tmp = &$this->point; |
|
| 65 | + $tmp = &$this->point; |
|
| 66 | 66 | $pr = &$point->getRef(); |
| 67 | 67 | $this->reset($pr); |
| 68 | 68 | $point->reset($tmp); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $output = []; |
| 130 | 130 | foreach ($phrase as $item) { |
| 131 | 131 | $e = explode($item, $string); |
| 132 | - array_pop($e);//remove the rest of string entry |
|
| 132 | + array_pop($e); //remove the rest of string entry |
|
| 133 | 133 | $output[$item] = $e; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $output = []; |
| 156 | 156 | foreach ($phrase as $item) { |
| 157 | 157 | $e = explode($item, $string); |
| 158 | - array_shift($e);//remove the first item always |
|
| 158 | + array_shift($e); //remove the first item always |
|
| 159 | 159 | $output[$item] = $e; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | // } |
| 43 | 43 | |
| 44 | 44 | if ($namespace !== null) { |
| 45 | - $class = $namespace . $class; |
|
| 45 | + $class = $namespace.$class; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | try { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | protected function getRealPath($phpFile) |
| 75 | 75 | { |
| 76 | 76 | if (Str::startsWith($this->path, ['phar'])) { |
| 77 | - $realPath = $phpFile->getPath() . '/' . $phpFile->getFilename(); |
|
| 77 | + $realPath = $phpFile->getPath().'/'.$phpFile->getFilename(); |
|
| 78 | 78 | } else { |
| 79 | 79 | $realPath = $phpFile->getRealPath(); |
| 80 | 80 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | if (T_CLASS === $tokens[$index][0]) { |
| 98 | 98 | $index += 2; // Skip class keyword and whitespace |
| 99 | 99 | if (is_array($tokens[$index]) && array_key_exists(1, $tokens[$index])) { |
| 100 | - $this->data[$realPath][] = $namespace . '\\' . $tokens[$index][1]; |
|
| 100 | + $this->data[$realPath][] = $namespace.'\\'.$tokens[$index][1]; |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | protected function filterData($needle) |
| 108 | 108 | { |
| 109 | - return array_values(array_filter($this->data[$this->path], function ($var) use ($needle) { |
|
| 109 | + return array_values(array_filter($this->data[$this->path], function($var) use ($needle) { |
|
| 110 | 110 | if (strpos($var, $needle) !== false) { |
| 111 | 111 | return true; |
| 112 | 112 | } |