@@ -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 | |
@@ -16,9 +16,9 @@ |
||
| 16 | 16 | * @package twhiston\twLib\Object |
| 17 | 17 | */ |
| 18 | 18 | /** |
| 19 | - * Class Instantiate |
|
| 20 | - * @package twhiston\twLib\Object |
|
| 21 | - */ |
|
| 19 | + * Class Instantiate |
|
| 20 | + * @package twhiston\twLib\Object |
|
| 21 | + */ |
|
| 22 | 22 | class Instantiate |
| 23 | 23 | { |
| 24 | 24 | |
@@ -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 { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if (T_CLASS === $tokens[$index][0]) { |
| 73 | 73 | $index += 2; // Skip class keyword and whitespace |
| 74 | 74 | if (is_array($tokens[$index]) && array_key_exists(1, $tokens[$index])) { |
| 75 | - $this->data[$this->path][] = $namespace . '\\' . $tokens[$index][1]; |
|
| 75 | + $this->data[$this->path][] = $namespace.'\\'.$tokens[$index][1]; |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | protected function filterData($needle) |
| 83 | 83 | { |
| 84 | - return array_values(array_filter($this->data[$this->path], function ($var) use ($needle) { |
|
| 84 | + return array_values(array_filter($this->data[$this->path], function($var) use ($needle) { |
|
| 85 | 85 | if (strpos($var, $needle) !== false) { |
| 86 | 86 | return true; |
| 87 | 87 | } |