@@ -10,8 +10,8 @@ |
||
10 | 10 | |
11 | 11 | namespace Kenjis\MonkeyPatch\Patcher; |
12 | 12 | |
13 | -require __DIR__ . '/ConstantPatcher/NodeVisitor.php'; |
|
14 | -require __DIR__ . '/ConstantPatcher/Proxy.php'; |
|
13 | +require __DIR__.'/ConstantPatcher/NodeVisitor.php'; |
|
14 | +require __DIR__.'/ConstantPatcher/Proxy.php'; |
|
15 | 15 | |
16 | 16 | use LogicException; |
17 | 17 |
@@ -173,13 +173,11 @@ |
||
173 | 173 | if (is_string($token)) |
174 | 174 | { |
175 | 175 | $new_source .= $token; |
176 | - } |
|
177 | - elseif ($i == $replacement['key']) |
|
176 | + } elseif ($i == $replacement['key']) |
|
178 | 177 | { |
179 | 178 | $new_source .= $replacement['value']; |
180 | 179 | $replacement = each(self::$replacement); |
181 | - } |
|
182 | - else |
|
180 | + } else |
|
183 | 181 | { |
184 | 182 | $new_source .= $token[1]; |
185 | 183 | } |
@@ -38,12 +38,12 @@ |
||
38 | 38 | $real_path = realpath($path); |
39 | 39 | if ($real_path === FALSE) |
40 | 40 | { |
41 | - throw new RuntimeException($path . ' does not exist?'); |
|
41 | + throw new RuntimeException($path.' does not exist?'); |
|
42 | 42 | } |
43 | 43 | if (is_dir($real_path)) |
44 | 44 | { |
45 | 45 | // Must use DIRECTORY_SEPARATOR for Windows |
46 | - $real_path = $real_path . DIRECTORY_SEPARATOR; |
|
46 | + $real_path = $real_path.DIRECTORY_SEPARATOR; |
|
47 | 47 | } |
48 | 48 | $new_paths[] = $excluded ? '-'.$real_path : $real_path; |
49 | 49 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | if ($this->db === null) |
37 | 37 | { |
38 | - $CI =& get_instance(); |
|
38 | + $CI = & get_instance(); |
|
39 | 39 | $CI->load->database(); |
40 | 40 | $this->db = $CI->db; |
41 | 41 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function tearDown() |
56 | 56 | { |
57 | - if (! empty($this->insertCache)) |
|
57 | + if ( ! empty($this->insertCache)) |
|
58 | 58 | { |
59 | 59 | foreach ($this->insertCache as $row) |
60 | 60 | { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function __construct() |
19 | 19 | { |
20 | - $this->CI =& get_instance(); |
|
20 | + $this->CI = & get_instance(); |
|
21 | 21 | $this->CI->load->database(); |
22 | 22 | $this->CI->load->dbforge(); |
23 | 23 | $this->db = $this->CI->db; |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | { |
34 | 34 | if ($this->seedPath === null) |
35 | 35 | { |
36 | - $this->seedPath = APPPATH . 'database/seeds/'; |
|
36 | + $this->seedPath = APPPATH.'database/seeds/'; |
|
37 | 37 | } |
38 | 38 | |
39 | - $file = $this->seedPath . $seeder . '.php'; |
|
39 | + $file = $this->seedPath.$seeder.'.php'; |
|
40 | 40 | require_once $file; |
41 | 41 | |
42 | 42 | $obj = new $seeder; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // methods in it. But we can't use them in |
46 | 46 | // `$this->request->setCallablePreConstructor()` |
47 | 47 | $mock = $this->testCase->getMockBuilder($classname); |
48 | - if (! $constructor_args) |
|
48 | + if ( ! $constructor_args) |
|
49 | 49 | { |
50 | 50 | $mock->disableOriginalConstructor(); |
51 | 51 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | break; |
102 | 102 | default: |
103 | 103 | throw new RuntimeException( |
104 | - 'Sorry, ' . $count . ' params not implemented yet' |
|
104 | + 'Sorry, '.$count.' params not implemented yet' |
|
105 | 105 | ); |
106 | 106 | } |
107 | 107 | } |
@@ -48,8 +48,7 @@ |
||
48 | 48 | if (! $constructor_args) |
49 | 49 | { |
50 | 50 | $mock->disableOriginalConstructor(); |
51 | - } |
|
52 | - elseif (is_array($constructor_args)) |
|
51 | + } elseif (is_array($constructor_args)) |
|
53 | 52 | { |
54 | 53 | $mock->setConstructorArgs($constructor_args); |
55 | 54 | } |