@@ -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); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // $class = $namespace.$class; |
42 | 42 | // } |
43 | 43 | |
44 | - if($namespace !== NULL){ |
|
44 | + if ($namespace !== NULL) { |
|
45 | 45 | $class = $namespace.$class; |
46 | 46 | } |
47 | 47 | |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | |
64 | 64 | } |
65 | 65 | //Make sure args are an array |
66 | - if($args !== NULL && $args !== FALSE){ |
|
66 | + if ($args !== NULL && $args !== FALSE) { |
|
67 | 67 | $args = (!is_array($args)) ? array($args) : $args; |
68 | - if(is_array($args)){ |
|
69 | - $c =count(array_filter(array_keys($args), 'is_string')); |
|
70 | - if(count(array_filter(array_keys($args), 'is_string')) > 0){ |
|
68 | + if (is_array($args)) { |
|
69 | + $c = count(array_filter(array_keys($args), 'is_string')); |
|
70 | + if (count(array_filter(array_keys($args), 'is_string')) > 0) { |
|
71 | 71 | $args = [$args]; |
72 | 72 | } |
73 | 73 | } |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * Immutable constructor. |
27 | 27 | * This must be called from your child class to make the object immutable |
28 | 28 | */ |
29 | - public function __construct(){ |
|
30 | - if($this->constructed){ |
|
29 | + public function __construct() { |
|
30 | + if ($this->constructed) { |
|
31 | 31 | throw new ImmutableException('Immutable Object'); |
32 | 32 | } |
33 | 33 | $this->constructed = TRUE; |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | * @param $name |
39 | 39 | * @param $value |
40 | 40 | */ |
41 | - final public function __set($name, $value){ |
|
41 | + final public function __set($name, $value) { |
|
42 | 42 | throw new ImmutableException('Immutable Object'); |
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Throw an exception on cloning |
47 | 47 | */ |
48 | - final public function __clone(){ |
|
48 | + final public function __clone() { |
|
49 | 49 | throw new ImmutableException('Immutable Object'); |
50 | 50 | } |
51 | 51 |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | |
21 | 21 | private $index; |
22 | 22 | |
23 | - public function __construct(\PHPUnit_Framework_TestCase $test){ |
|
23 | + public function __construct(\PHPUnit_Framework_TestCase $test) { |
|
24 | 24 | $this->owner = $test; |
25 | 25 | $this->index = 0; |
26 | 26 | } |
27 | 27 | |
28 | - public function reset(){ |
|
28 | + public function reset() { |
|
29 | 29 | $index = 0; |
30 | 30 | } |
31 | 31 | |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | * @param array $context |
38 | 38 | * @return null |
39 | 39 | */ |
40 | - public function log($level, $message, array $context = array()){ |
|
40 | + public function log($level, $message, array $context = array()) { |
|
41 | 41 | |
42 | - $this->owner->assertArrayHasKey($this->index,$this->expected); |
|
43 | - $this->owner->assertStringStartsWith($this->expected[$this->index++],$message); |
|
42 | + $this->owner->assertArrayHasKey($this->index, $this->expected); |
|
43 | + $this->owner->assertStringStartsWith($this->expected[$this->index++], $message); |
|
44 | 44 | } |
45 | 45 | |
46 | - public function setExpectedMessages(array $messages){ |
|
46 | + public function setExpectedMessages(array $messages) { |
|
47 | 47 | $this->expected = $messages; |
48 | 48 | } |
49 | 49 | } |
50 | 50 | \ No newline at end of file |
@@ -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 |