Completed
Pull Request — master (#108)
by
unknown
02:50
created
application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			return $this->$name;
42 42
 		}
43 43
 
44
-		throw new LogicException('No such property: ' . $name);
44
+		throw new LogicException('No such property: '.$name);
45 45
 	}
46 46
 
47 47
 	public static function setUpBeforeClass()
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	{
62 62
 		reset_instance();
63 63
 		CIPHPUnitTest::createCodeIgniterInstance();
64
-		$this->CI =& get_instance();
64
+		$this->CI = & get_instance();
65 65
 	}
66 66
 
67 67
 	protected function tearDown()
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		$this->assertSame(
237 237
 			$code,
238 238
 			$actual,
239
-			'Status code is not ' . $code . ' but ' . $actual . '.'
239
+			'Status code is not '.$code.' but '.$actual.'.'
240 240
 		);
241 241
 	}
242 242
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function assertResponseHeader($name, $value)
250 250
 	{
251
-		$CI =& get_instance();
251
+		$CI = & get_instance();
252 252
 		$actual = $CI->output->get_header($name);
253 253
 
254 254
 		if ($actual === null)
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 	 */
273 273
 	public function assertResponseCookie($name, $value, $allow_duplicate = false)
274 274
 	{
275
-		$CI =& get_instance();
275
+		$CI = & get_instance();
276 276
 		$cookies = isset($CI->output->_cookies[$name])
277 277
 			? $CI->output->_cookies[$name] : null;
278 278
 
@@ -330,23 +330,23 @@  discard block
 block discarded – undo
330 330
 			$this->fail('redirect() is not called.');
331 331
 		}
332 332
 
333
-		if (! function_exists('site_url'))
333
+		if ( ! function_exists('site_url'))
334 334
 		{
335
-			$CI =& get_instance();
335
+			$CI = & get_instance();
336 336
 			$CI->load->helper('url');
337 337
 		}
338 338
 
339
-		if (! preg_match('#^(\w+:)?//#i', $uri))
339
+		if ( ! preg_match('#^(\w+:)?//#i', $uri))
340 340
 		{
341 341
 			$uri = site_url($uri);
342 342
 		}
343 343
 		$absolute_url = $uri;
344
-		$expected = 'Redirect to ' . $absolute_url;
344
+		$expected = 'Redirect to '.$absolute_url;
345 345
 
346 346
 		$this->assertSame(
347 347
 			$expected,
348 348
 			$status['redirect'],
349
-			'URL to redirect is not ' . $expected . ' but ' . $status['redirect'] . '.'
349
+			'URL to redirect is not '.$expected.' but '.$status['redirect'].'.'
350 350
 		);
351 351
 
352 352
 		if ($code !== null)
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 			$this->assertSame(
355 355
 				$code,
356 356
 				$status['code'],
357
-				'Status code is not ' . $code . ' but ' . $status['code'] . '.'
357
+				'Status code is not '.$code.' but '.$status['code'].'.'
358 358
 			);
359 359
 		}
360 360
 	}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestNullCodeIgniter.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/exceptions/CIPHPUnitTestShow404Exception.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/Exception/ExitException.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/exceptions/CIPHPUnitTestShowErrorException.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
Installer.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
     public static function install($app = 'application')
16 16
     {
17 17
         self::recursiveCopy(
18
-            dirname(__FILE__) . '/application/tests',
19
-            $app . '/' . static::TEST_FOLDER
18
+            dirname(__FILE__).'/application/tests',
19
+            $app.'/'.static::TEST_FOLDER
20 20
         );
21 21
         self::fixPath($app);
22 22
     }
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
      */
27 27
     private static function fixPath($app = 'application')
28 28
     {
29
-        $file = $app . '/' . static::TEST_FOLDER . '/Bootstrap.php';
29
+        $file = $app.'/'.static::TEST_FOLDER.'/Bootstrap.php';
30 30
         $contents = file_get_contents($file);
31 31
         
32
-        if (! file_exists('system')) {
32
+        if ( ! file_exists('system')) {
33 33
             if (file_exists('vendor/codeigniter/framework/system')) {
34 34
                 $contents = str_replace(
35 35
                     '$system_path = \'../../system\';',
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
             }
42 42
         }
43 43
         
44
-        if (! file_exists('index.php')) {
44
+        if ( ! file_exists('index.php')) {
45 45
             if (file_exists('public/index.php')) {
46 46
                 $contents = str_replace(
47 47
                     "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
48 48
                     "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
49 49
                     $contents
50 50
                 );
51
-            } elseif (file_exists($app . '/public/index.php')) {
51
+            } elseif (file_exists($app.'/public/index.php')) {
52 52
                 $contents = str_replace(
53 53
                     "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
54 54
                     "define('FCPATH', realpath(dirname(__FILE__).'/../public').'/');",
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 
72 72
     public static function update($app = 'application')
73 73
     {
74
-        $target_dir = $app . '/' . static::TEST_FOLDER . '/_ci_phpunit_test';
74
+        $target_dir = $app.'/'.static::TEST_FOLDER.'/_ci_phpunit_test';
75 75
         self::recursiveUnlink($target_dir);
76 76
         self::recursiveCopy(
77
-            dirname(__FILE__) . '/application/tests/_ci_phpunit_test',
77
+            dirname(__FILE__).'/application/tests/_ci_phpunit_test',
78 78
             $target_dir
79 79
         );
80 80
     }
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
         
97 97
         foreach ($iterator as $file) {
98 98
             if ($file->isDir()) {
99
-                @mkdir($dst . '/' . $iterator->getSubPathName());
99
+                @mkdir($dst.'/'.$iterator->getSubPathName());
100 100
             } else {
101
-                $success = copy($file, $dst . '/' . $iterator->getSubPathName());
101
+                $success = copy($file, $dst.'/'.$iterator->getSubPathName());
102 102
                 if ($success) {
103
-                    echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
103
+                    echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL;
104 104
                 }
105 105
             }
106 106
         }
Please login to merge, or discard this patch.
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -1,145 +1,145 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class Installer
12 12
 {
13
-    const TEST_FOLDER = 'tests';
13
+	const TEST_FOLDER = 'tests';
14 14
 
15
-    public static function install($app = 'application')
16
-    {
17
-        self::recursiveCopy(
18
-            dirname(__FILE__) . '/application/tests',
19
-            $app . '/' . static::TEST_FOLDER
20
-        );
21
-        self::fixPath($app);
22
-    }
15
+	public static function install($app = 'application')
16
+	{
17
+		self::recursiveCopy(
18
+			dirname(__FILE__) . '/application/tests',
19
+			$app . '/' . static::TEST_FOLDER
20
+		);
21
+		self::fixPath($app);
22
+	}
23 23
 
24
-    /**
25
-     * Fix paths in Bootstrap.php
26
-     */
27
-    private static function fixPath($app = 'application')
28
-    {
29
-        $file = $app . '/' . static::TEST_FOLDER . '/Bootstrap.php';
30
-        $contents = file_get_contents($file);
24
+	/**
25
+	 * Fix paths in Bootstrap.php
26
+	 */
27
+	private static function fixPath($app = 'application')
28
+	{
29
+		$file = $app . '/' . static::TEST_FOLDER . '/Bootstrap.php';
30
+		$contents = file_get_contents($file);
31 31
         
32
-        if (! file_exists('system')) {
33
-            if (file_exists('vendor/codeigniter/framework/system')) {
34
-                $contents = str_replace(
35
-                    '$system_path = \'../../system\';',
36
-                    '$system_path = \'../../vendor/codeigniter/framework/system\';',
37
-                    $contents
38
-                );
39
-            } else {
40
-                throw new Exception('Can\'t find "system" folder.');
41
-            }
42
-        }
32
+		if (! file_exists('system')) {
33
+			if (file_exists('vendor/codeigniter/framework/system')) {
34
+				$contents = str_replace(
35
+					'$system_path = \'../../system\';',
36
+					'$system_path = \'../../vendor/codeigniter/framework/system\';',
37
+					$contents
38
+				);
39
+			} else {
40
+				throw new Exception('Can\'t find "system" folder.');
41
+			}
42
+		}
43 43
         
44
-        if (! file_exists('index.php')) {
45
-            if (file_exists('public/index.php')) {
46
-                // CodeIgniter 3.0.6 and after
47
-                $contents = str_replace(
48
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
49
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../../public').DIRECTORY_SEPARATOR);",
50
-                    $contents
51
-                );
52
-                // CodeIgniter 3.0.5 and before
53
-                $contents = str_replace(
54
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
55
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
56
-                    $contents
57
-                );
58
-            } elseif (file_exists($app . '/public/index.php')) {
59
-                // CodeIgniter 3.0.6 and after
60
-                $contents = str_replace(
61
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
62
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../public').DIRECTORY_SEPARATOR);",
63
-                    $contents
64
-                );
65
-                // CodeIgniter 3.0.5 and before
66
-                $contents = str_replace(
67
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
68
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../public').'/');",
69
-                    $contents
70
-                );
71
-                if ($app != 'application') {
72
-                    $contents = str_replace(
73
-                        "\$application_folder = '../../application';",
74
-                        "\$application_folder = '../../{$app}';",
75
-                        $contents
76
-                    );
77
-                }
78
-            } else {
79
-                throw new Exception('Can\'t find "index.php".');
80
-            }
81
-        }
44
+		if (! file_exists('index.php')) {
45
+			if (file_exists('public/index.php')) {
46
+				// CodeIgniter 3.0.6 and after
47
+				$contents = str_replace(
48
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
49
+					"define('FCPATH', realpath(dirname(__FILE__).'/../../public').DIRECTORY_SEPARATOR);",
50
+					$contents
51
+				);
52
+				// CodeIgniter 3.0.5 and before
53
+				$contents = str_replace(
54
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
55
+					"define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
56
+					$contents
57
+				);
58
+			} elseif (file_exists($app . '/public/index.php')) {
59
+				// CodeIgniter 3.0.6 and after
60
+				$contents = str_replace(
61
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
62
+					"define('FCPATH', realpath(dirname(__FILE__).'/../public').DIRECTORY_SEPARATOR);",
63
+					$contents
64
+				);
65
+				// CodeIgniter 3.0.5 and before
66
+				$contents = str_replace(
67
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
68
+					"define('FCPATH', realpath(dirname(__FILE__).'/../public').'/');",
69
+					$contents
70
+				);
71
+				if ($app != 'application') {
72
+					$contents = str_replace(
73
+						"\$application_folder = '../../application';",
74
+						"\$application_folder = '../../{$app}';",
75
+						$contents
76
+					);
77
+				}
78
+			} else {
79
+				throw new Exception('Can\'t find "index.php".');
80
+			}
81
+		}
82 82
         
83
-        file_put_contents($file, $contents);
84
-    }
83
+		file_put_contents($file, $contents);
84
+	}
85 85
 
86
-    public static function update($app = 'application')
87
-    {
88
-        $target_dir = $app . '/' . static::TEST_FOLDER . '/_ci_phpunit_test';
89
-        self::recursiveUnlink($target_dir);
90
-        self::recursiveCopy(
91
-            dirname(__FILE__) . '/application/tests/_ci_phpunit_test',
92
-            $target_dir
93
-        );
94
-    }
86
+	public static function update($app = 'application')
87
+	{
88
+		$target_dir = $app . '/' . static::TEST_FOLDER . '/_ci_phpunit_test';
89
+		self::recursiveUnlink($target_dir);
90
+		self::recursiveCopy(
91
+			dirname(__FILE__) . '/application/tests/_ci_phpunit_test',
92
+			$target_dir
93
+		);
94
+	}
95 95
 
96
-    /**
97
-     * Recursive Copy
98
-     *
99
-     * @param string $src
100
-     * @param string $dst
101
-     */
102
-    private static function recursiveCopy($src, $dst)
103
-    {
104
-        @mkdir($dst, 0755);
96
+	/**
97
+	 * Recursive Copy
98
+	 *
99
+	 * @param string $src
100
+	 * @param string $dst
101
+	 */
102
+	private static function recursiveCopy($src, $dst)
103
+	{
104
+		@mkdir($dst, 0755);
105 105
         
106
-        $iterator = new \RecursiveIteratorIterator(
107
-            new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
108
-            \RecursiveIteratorIterator::SELF_FIRST
109
-        );
106
+		$iterator = new \RecursiveIteratorIterator(
107
+			new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
108
+			\RecursiveIteratorIterator::SELF_FIRST
109
+		);
110 110
         
111
-        foreach ($iterator as $file) {
112
-            if ($file->isDir()) {
113
-                @mkdir($dst . '/' . $iterator->getSubPathName());
114
-            } else {
115
-                $success = copy($file, $dst . '/' . $iterator->getSubPathName());
116
-                if ($success) {
117
-                    echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
118
-                }
119
-            }
120
-        }
121
-    }
111
+		foreach ($iterator as $file) {
112
+			if ($file->isDir()) {
113
+				@mkdir($dst . '/' . $iterator->getSubPathName());
114
+			} else {
115
+				$success = copy($file, $dst . '/' . $iterator->getSubPathName());
116
+				if ($success) {
117
+					echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
118
+				}
119
+			}
120
+		}
121
+	}
122 122
 
123
-    /**
124
-     * Recursive Unlink
125
-     *
126
-     * @param string $dir
127
-     */
128
-    private static function recursiveUnlink($dir)
129
-    {
130
-        $iterator = new \RecursiveIteratorIterator(
131
-            new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
132
-            \RecursiveIteratorIterator::CHILD_FIRST
133
-        );
123
+	/**
124
+	 * Recursive Unlink
125
+	 *
126
+	 * @param string $dir
127
+	 */
128
+	private static function recursiveUnlink($dir)
129
+	{
130
+		$iterator = new \RecursiveIteratorIterator(
131
+			new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
132
+			\RecursiveIteratorIterator::CHILD_FIRST
133
+		);
134 134
         
135
-        foreach ($iterator as $file) {
136
-            if ($file->isDir()) {
137
-                rmdir($file);
138
-            } else {
139
-                unlink($file);
140
-            }
141
-        }
135
+		foreach ($iterator as $file) {
136
+			if ($file->isDir()) {
137
+				rmdir($file);
138
+			} else {
139
+				unlink($file);
140
+			}
141
+		}
142 142
         
143
-        rmdir($dir);
144
-    }
143
+		rmdir($dir);
144
+	}
145 145
 }
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/Patcher/ConstantPatcher/NodeVisitor.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use PhpParser\Node;
14 14
 use PhpParser\Node\Stmt\ClassMethod;
15 15
 use PhpParser\NodeVisitorAbstract;
16
-
17 16
 use Kenjis\MonkeyPatch\Patcher\MethodPatcher;
18 17
 
19 18
 class NodeVisitor extends NodeVisitorAbstract
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2016 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2016 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 namespace Kenjis\MonkeyPatch\Patcher;
12 12
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 	public function enterNode(Node $node)
26 26
 	{
27
-		$callback = [$this, 'before' . ucfirst($node->getType())];
27
+		$callback = [$this, 'before'.ucfirst($node->getType())];
28 28
 		if (is_callable($callback)) {
29 29
 			call_user_func_array($callback, [$node]);
30 30
 		}
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function leaveNode(Node $node)
34 34
 	{
35
-		if (! ($node instanceof ConstFetch))
35
+		if ( ! ($node instanceof ConstFetch))
36 36
 		{
37
-			$callback = [$this, 'rewrite' . ucfirst($node->getType())];
37
+			$callback = [$this, 'rewrite'.ucfirst($node->getType())];
38 38
 			if (is_callable($callback)) {
39 39
 				call_user_func_array($callback, [$node]);
40 40
 			}
@@ -47,26 +47,26 @@  discard block
 block discarded – undo
47 47
 			return;
48 48
 		}
49 49
 
50
-		if (! ($node->name instanceof Name))
50
+		if ( ! ($node->name instanceof Name))
51 51
 		{
52 52
 			return;
53 53
 		}
54 54
 
55
-		if (! $node->name->isUnqualified())
55
+		if ( ! $node->name->isUnqualified())
56 56
 		{
57 57
 			return;
58 58
 		}
59 59
 
60
-		if (! ConstantPatcher::isBlacklisted((string) $node->name))
60
+		if ( ! ConstantPatcher::isBlacklisted((string) $node->name))
61 61
 		{
62 62
 			$replacement = new FullyQualified(array());
63 63
 			$replacement->set(
64
-				'\__ConstProxy__::get(\'' . (string) $node->name . '\')'
64
+				'\__ConstProxy__::get(\''.(string) $node->name.'\')'
65 65
 			);
66 66
 
67 67
 			$pos = $node->getAttribute('startTokenPos');
68 68
 			ConstantPatcher::$replacement[$pos] = 
69
-				'\__ConstProxy__::get(\'' . (string) $node->name .'\')';
69
+				'\__ConstProxy__::get(\''.(string) $node->name.'\')';
70 70
 
71 71
 			$node->name = $replacement;
72 72
 		}
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/Patcher/ConstantPatcher/Proxy.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 class CategorySeeder extends Seeder {
12 12
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/Patcher/ConstantPatcher.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of ci-phpunit-test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2016 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of ci-phpunit-test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2016 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 namespace Kenjis\MonkeyPatch\Patcher;
12 12
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -173,13 +173,11 @@
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.