@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | if (in_array($class, $this->alias)) |
71 | 71 | { |
72 | - $dir = __DIR__ . '/alias'; |
|
72 | + $dir = __DIR__.'/alias'; |
|
73 | 73 | $this->loadClassFile($dir, $class); |
74 | 74 | } |
75 | 75 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | else |
90 | 90 | { |
91 | - $dir = __DIR__ . '/exceptions'; |
|
91 | + $dir = __DIR__.'/exceptions'; |
|
92 | 92 | $this->loadClassFile($dir, $class); |
93 | 93 | } |
94 | 94 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | protected function loadClassFile($dir, $class) |
131 | 131 | { |
132 | - $class_file = $dir . '/' . $class . '.php'; |
|
132 | + $class_file = $dir.'/'.$class.'.php'; |
|
133 | 133 | if (file_exists($class_file)) |
134 | 134 | { |
135 | 135 | require $class_file; |
@@ -24,18 +24,18 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | $dir = dirname($this->file); |
27 | - if (! is_dir($dir)) |
|
27 | + if ( ! is_dir($dir)) |
|
28 | 28 | { |
29 | 29 | if (@mkdir($dir, 0777, true) === false) |
30 | 30 | { |
31 | - throw new RuntimeException('Failed to create folder: ' . $dir); |
|
31 | + throw new RuntimeException('Failed to create folder: '.$dir); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | 35 | if (file_put_contents($this->file, '') === false) |
36 | 36 | { |
37 | 37 | throw new RuntimeException( |
38 | - 'Failed to write to cache file: ' . $this->file |
|
38 | + 'Failed to write to cache file: '.$this->file |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $ref_method->setAccessible(true); |
22 | 22 | $obj = (gettype($obj) === 'object') ? $obj : null; |
23 | 23 | |
24 | - return function () use ($obj, $ref_method) { |
|
24 | + return function() use ($obj, $ref_method) { |
|
25 | 25 | $args = func_get_args(); |
26 | 26 | return $ref_method->invokeArgs($obj, $args); |
27 | 27 | }; |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | throw new LogicException("No such directory: $dir"); |
46 | 46 | } |
47 | 47 | |
48 | - self::$src_cache_dir = self::$cache_dir . '/src'; |
|
48 | + self::$src_cache_dir = self::$cache_dir.'/src'; |
|
49 | 49 | self::$tmp_function_whitelist_file = |
50 | - self::$cache_dir . '/conf/func_whiltelist.php'; |
|
50 | + self::$cache_dir.'/conf/func_whiltelist.php'; |
|
51 | 51 | self::$tmp_function_blacklist_file = |
52 | - self::$cache_dir . '/conf/func_blacklist.php'; |
|
52 | + self::$cache_dir.'/conf/func_blacklist.php'; |
|
53 | 53 | self::$tmp_patcher_list_file = |
54 | - self::$cache_dir . '/conf/patcher_list.php'; |
|
54 | + self::$cache_dir.'/conf/patcher_list.php'; |
|
55 | 55 | self::$tmp_include_paths_file = |
56 | - self::$cache_dir . '/conf/include_paths.php'; |
|
56 | + self::$cache_dir.'/conf/include_paths.php'; |
|
57 | 57 | self::$tmp_exclude_paths_file = |
58 | - self::$cache_dir . '/conf/exclude_paths.php'; |
|
58 | + self::$cache_dir.'/conf/exclude_paths.php'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public static function getCacheDir() |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | |
76 | - return self::$src_cache_dir . '/' . $relative_path; |
|
76 | + return self::$src_cache_dir.'/'.$relative_path; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | protected static function createDir($dir) |
80 | 80 | { |
81 | - if (! is_dir($dir)) |
|
81 | + if ( ! is_dir($dir)) |
|
82 | 82 | { |
83 | - if (! @mkdir($dir, 0777, true)) |
|
83 | + if ( ! @mkdir($dir, 0777, true)) |
|
84 | 84 | { |
85 | - throw new RuntimeException('Failed to create folder: ' . $dir); |
|
85 | + throw new RuntimeException('Failed to create folder: '.$dir); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public static function appendTmpFunctionBlacklist($function) |
155 | 155 | { |
156 | 156 | file_put_contents( |
157 | - self::getTmpFunctionBlacklistFile(), $function . "\n", FILE_APPEND |
|
157 | + self::getTmpFunctionBlacklistFile(), $function."\n", FILE_APPEND |
|
158 | 158 | ); |
159 | 159 | } |
160 | 160 | |
@@ -234,20 +234,20 @@ discard block |
||
234 | 234 | { |
235 | 235 | $cache = self::getSrcCacheFilePath($orig_file); |
236 | 236 | @unlink($cache); |
237 | - MonkeyPatchManager::log('remove_src_cache: ' . $cache); |
|
237 | + MonkeyPatchManager::log('remove_src_cache: '.$cache); |
|
238 | 238 | return $cache; |
239 | 239 | } |
240 | 240 | |
241 | 241 | public static function clearSrcCache() |
242 | 242 | { |
243 | 243 | self::recursiveUnlink(self::$src_cache_dir); |
244 | - MonkeyPatchManager::log('clear_src_cache: cleared ' . self::$src_cache_dir); |
|
244 | + MonkeyPatchManager::log('clear_src_cache: cleared '.self::$src_cache_dir); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | public static function clearCache() |
248 | 248 | { |
249 | 249 | self::recursiveUnlink(self::$cache_dir); |
250 | - MonkeyPatchManager::log('clear_cache: cleared ' . self::$cache_dir); |
|
250 | + MonkeyPatchManager::log('clear_cache: cleared '.self::$cache_dir); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | protected static function recursiveUnlink($dir) |
259 | 259 | { |
260 | - if (! is_dir($dir)) |
|
260 | + if ( ! is_dir($dir)) |
|
261 | 261 | { |
262 | 262 | return; |
263 | 263 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | $this->unwrap(); |
61 | 61 | |
62 | - MonkeyPatchManager::log('stream_open: ' . $path); |
|
62 | + MonkeyPatchManager::log('stream_open: '.$path); |
|
63 | 63 | |
64 | 64 | $including = (bool) ($options & self::STREAM_OPEN_FOR_INCLUDE); |
65 | 65 | if ($including && $this->shouldPreprocess($path)) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | PHPUnit_Framework_TestCase::assertEquals( |
55 | 55 | $expected_times, |
56 | 56 | $actual_times, |
57 | - $class_method . '() expected to be not invoked, but invoked ' . $actual_times . ' times.' |
|
57 | + $class_method.'() expected to be not invoked, but invoked '.$actual_times.' times.' |
|
58 | 58 | ); |
59 | 59 | } |
60 | 60 | elseif ($expected_times === '+') |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | PHPUnit_Framework_TestCase::assertGreaterThanOrEqual( |
63 | 63 | 1, |
64 | 64 | $actual_times, |
65 | - $class_method . '() expected to be invoked at least one time, but invoked ' . $actual_times . ' times.' |
|
65 | + $class_method.'() expected to be invoked at least one time, but invoked '.$actual_times.' times.' |
|
66 | 66 | ); |
67 | 67 | } |
68 | 68 | else |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | PHPUnit_Framework_TestCase::assertEquals( |
71 | 71 | $expected_times, |
72 | 72 | $actual_times, |
73 | - $class_method . '() expected to be invoked ' . $expected_times . ' times, but invoked ' . $actual_times . ' times.' |
|
73 | + $class_method.'() expected to be invoked '.$expected_times.' times, but invoked '.$actual_times.' times.' |
|
74 | 74 | ); |
75 | 75 | } |
76 | 76 | } |
@@ -18,11 +18,11 @@ |
||
18 | 18 | |
19 | 19 | if ($class === null) |
20 | 20 | { |
21 | - $message = 'exit() called in ' . $method . '() function'; |
|
21 | + $message = 'exit() called in '.$method.'() function'; |
|
22 | 22 | } |
23 | 23 | else |
24 | 24 | { |
25 | - $message = 'exit() called in ' . $class . '::' . $method . '()'; |
|
25 | + $message = 'exit() called in '.$class.'::'.$method.'()'; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $exception_name = Kenjis\MonkeyPatch\MonkeyPatchManager::getExitExceptionClassname(); |
@@ -105,7 +105,7 @@ |
||
105 | 105 | ob_end_clean(); |
106 | 106 | } |
107 | 107 | |
108 | - throw new CIPHPUnitTestRedirectException('Redirect to ' . $uri, $code); |
|
108 | + throw new CIPHPUnitTestRedirectException('Redirect to '.$uri, $code); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function test_APPPATH() |
26 | 26 | { |
27 | 27 | $actual = realpath(APPPATH); |
28 | - $expected = realpath(__DIR__ . '/../..'); |
|
28 | + $expected = realpath(__DIR__.'/../..'); |
|
29 | 29 | $this->assertEquals( |
30 | 30 | $expected, |
31 | 31 | $actual, |