@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $method = isset($info['class_method']) ? $info['class_method'] : $info['function']; |
| 66 | 66 | |
| 67 | 67 | MonkeyPatchManager::log( |
| 68 | - 'invoke_const: ' . $constant . ') on line ' . $line . ' in ' . $file . ' by ' . $method . '()' |
|
| 68 | + 'invoke_const: '.$constant.') on line '.$line.' in '.$file.' by '.$method.'()' |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -111,10 +111,10 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | if (isset(self::$patches_to_apply[$constant])) |
| 113 | 113 | { |
| 114 | - if (! self::checkCalledMethod($constant)) |
|
| 114 | + if ( ! self::checkCalledMethod($constant)) |
|
| 115 | 115 | { |
| 116 | 116 | MonkeyPatchManager::log( |
| 117 | - 'invoke_const: ' . $constant . ' not patched (out of scope)' |
|
| 117 | + 'invoke_const: '.$constant.' not patched (out of scope)' |
|
| 118 | 118 | ); |
| 119 | 119 | return constant($constant); |
| 120 | 120 | } |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | if (array_key_exists($constant, self::$patches)) |
| 124 | 124 | { |
| 125 | - MonkeyPatchManager::log('invoke_const: ' . $constant . ' patched'); |
|
| 125 | + MonkeyPatchManager::log('invoke_const: '.$constant.' patched'); |
|
| 126 | 126 | return self::$patches[$constant]; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | MonkeyPatchManager::log( |
| 130 | - 'invoke_const: ' . $constant . ' not patched (no patch)' |
|
| 130 | + 'invoke_const: '.$constant.' not patched (no patch)' |
|
| 131 | 131 | ); |
| 132 | 132 | return constant($constant); |
| 133 | 133 | } |
@@ -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; |