Completed
Push — master ( 57eaac...84ae94 )
by Kenji
03:19 queued 12s
created
Installer.php 2 patches
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -10,108 +10,108 @@
 block discarded – undo
10 10
 
11 11
 class Installer
12 12
 {
13
-    const TEST_FOLDER = 'application/tests';
13
+	const TEST_FOLDER = 'application/tests';
14 14
 
15
-    public static function install()
16
-    {
17
-        self::recursiveCopy(
18
-            'vendor/kenjis/ci-phpunit-test/application/tests',
19
-            static::TEST_FOLDER
20
-        );
21
-        self::fixPath();
22
-    }
15
+	public static function install()
16
+	{
17
+		self::recursiveCopy(
18
+			'vendor/kenjis/ci-phpunit-test/application/tests',
19
+			static::TEST_FOLDER
20
+		);
21
+		self::fixPath();
22
+	}
23 23
 
24
-    /**
25
-     * Fix paths in Bootstrap.php
26
-     */
27
-    private static function fixPath()
28
-    {
29
-        $file = static::TEST_FOLDER . '/Bootstrap.php';
30
-        $contents = file_get_contents($file);
24
+	/**
25
+	 * Fix paths in Bootstrap.php
26
+	 */
27
+	private static function fixPath()
28
+	{
29
+		$file = 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
-                $contents = str_replace(
47
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
48
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
49
-                    $contents
50
-                );
51
-            } else {
52
-                throw new Exception('Can\'t find "index.php".');
53
-            }
54
-        }
44
+		if (! file_exists('index.php')) {
45
+			if (file_exists('public/index.php')) {
46
+				$contents = str_replace(
47
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
48
+					"define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
49
+					$contents
50
+				);
51
+			} else {
52
+				throw new Exception('Can\'t find "index.php".');
53
+			}
54
+		}
55 55
         
56
-        file_put_contents($file, $contents);
57
-    }
56
+		file_put_contents($file, $contents);
57
+	}
58 58
 
59
-    public static function update()
60
-    {
61
-        self::recursiveUnlink('application/tests/_ci_phpunit_test');
62
-        self::recursiveCopy(
63
-            'vendor/kenjis/ci-phpunit-test/application/tests/_ci_phpunit_test',
64
-            'application/tests/_ci_phpunit_test'
65
-        );
66
-    }
59
+	public static function update()
60
+	{
61
+		self::recursiveUnlink('application/tests/_ci_phpunit_test');
62
+		self::recursiveCopy(
63
+			'vendor/kenjis/ci-phpunit-test/application/tests/_ci_phpunit_test',
64
+			'application/tests/_ci_phpunit_test'
65
+		);
66
+	}
67 67
 
68
-    /**
69
-     * Recursive Copy
70
-     *
71
-     * @param string $src
72
-     * @param string $dst
73
-     */
74
-    private static function recursiveCopy($src, $dst)
75
-    {
76
-        @mkdir($dst, 0755);
68
+	/**
69
+	 * Recursive Copy
70
+	 *
71
+	 * @param string $src
72
+	 * @param string $dst
73
+	 */
74
+	private static function recursiveCopy($src, $dst)
75
+	{
76
+		@mkdir($dst, 0755);
77 77
         
78
-        $iterator = new \RecursiveIteratorIterator(
79
-            new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
80
-            \RecursiveIteratorIterator::SELF_FIRST
81
-        );
78
+		$iterator = new \RecursiveIteratorIterator(
79
+			new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
80
+			\RecursiveIteratorIterator::SELF_FIRST
81
+		);
82 82
         
83
-        foreach ($iterator as $file) {
84
-            if ($file->isDir()) {
85
-                @mkdir($dst . '/' . $iterator->getSubPathName());
86
-            } else {
87
-                $success = copy($file, $dst . '/' . $iterator->getSubPathName());
88
-                if ($success) {
89
-                    echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
90
-                }
91
-            }
92
-        }
93
-    }
83
+		foreach ($iterator as $file) {
84
+			if ($file->isDir()) {
85
+				@mkdir($dst . '/' . $iterator->getSubPathName());
86
+			} else {
87
+				$success = copy($file, $dst . '/' . $iterator->getSubPathName());
88
+				if ($success) {
89
+					echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
90
+				}
91
+			}
92
+		}
93
+	}
94 94
 
95
-    /**
96
-     * Recursive Unlink
97
-     *
98
-     * @param string $dir
99
-     */
100
-    private static function recursiveUnlink($dir)
101
-    {
102
-        $iterator = new \RecursiveIteratorIterator(
103
-            new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
104
-            \RecursiveIteratorIterator::CHILD_FIRST
105
-        );
95
+	/**
96
+	 * Recursive Unlink
97
+	 *
98
+	 * @param string $dir
99
+	 */
100
+	private static function recursiveUnlink($dir)
101
+	{
102
+		$iterator = new \RecursiveIteratorIterator(
103
+			new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
104
+			\RecursiveIteratorIterator::CHILD_FIRST
105
+		);
106 106
         
107
-        foreach ($iterator as $file) {
108
-            if ($file->isDir()) {
109
-                rmdir($file);
110
-            } else {
111
-                unlink($file);
112
-            }
113
-        }
107
+		foreach ($iterator as $file) {
108
+			if ($file->isDir()) {
109
+				rmdir($file);
110
+			} else {
111
+				unlink($file);
112
+			}
113
+		}
114 114
         
115
-        rmdir($dir);
116
-    }
115
+		rmdir($dir);
116
+	}
117 117
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
      */
27 27
     private static function fixPath()
28 28
     {
29
-        $file = static::TEST_FOLDER . '/Bootstrap.php';
29
+        $file = 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,7 +41,7 @@  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__).'/../..').'/');",
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         
83 83
         foreach ($iterator as $file) {
84 84
             if ($file->isDir()) {
85
-                @mkdir($dst . '/' . $iterator->getSubPathName());
85
+                @mkdir($dst.'/'.$iterator->getSubPathName());
86 86
             } else {
87
-                $success = copy($file, $dst . '/' . $iterator->getSubPathName());
87
+                $success = copy($file, $dst.'/'.$iterator->getSubPathName());
88 88
                 if ($success) {
89
-                    echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
89
+                    echo 'copied: '.$dst.'/'.$iterator->getSubPathName().PHP_EOL;
90 90
                 }
91 91
             }
92 92
         }
Please login to merge, or discard this patch.
application/libraries/Seeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	public function __construct()
18 18
 	{
19
-		$this->CI =& get_instance();
19
+		$this->CI = & get_instance();
20 20
 		$this->CI->load->database();
21 21
 		$this->CI->load->dbforge();
22 22
 		$this->db = $this->CI->db;
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function call($seeder)
32 32
 	{
33
-		$file = APPPATH . 'database/seeds/' . $seeder . '.php';
33
+		$file = APPPATH.'database/seeds/'.$seeder.'.php';
34 34
 		require_once $file;
35 35
 		$obj = new $seeder;
36 36
 		$obj->run();
Please login to merge, or discard this patch.
application/tests/Bootstrap.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
  * NOTE: If you change these, also change the error_reporting() code below
55 55
  */
56 56
 // This is needed for @runInSeparateProcess
57
-if (! defined('ENVIRONMENT'))
57
+if ( ! defined('ENVIRONMENT'))
58 58
 {
59 59
 	define('ENVIRONMENT', 'testing');
60 60
 }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
  *  Added for CI PHPUnit Test
328 328
  * -------------------------------------------------------------------
329 329
  */
330
-require __DIR__ . '/_ci_phpunit_test/CIPHPUnitTest.php';
330
+require __DIR__.'/_ci_phpunit_test/CIPHPUnitTest.php';
331 331
 CIPHPUnitTest::init();
332 332
 /*
333 333
  * Or you can set directories for autoloading
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CodeIgniter
4
- *
5
- * An open source application development framework for PHP
6
- *
7
- * This content is released under the MIT License (MIT)
8
- *
9
- * Copyright (c) 2014 - 2016, British Columbia Institute of Technology
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in
19
- * all copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- * THE SOFTWARE.
28
- *
29
- * @package	CodeIgniter
30
- * @author	EllisLab Dev Team
31
- * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
32
- * @copyright	Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
33
- * @license	http://opensource.org/licenses/MIT	MIT License
34
- * @link	https://codeigniter.com
35
- * @since	Version 1.0.0
36
- * @filesource
37
- */
3
+	 * CodeIgniter
4
+	 *
5
+	 * An open source application development framework for PHP
6
+	 *
7
+	 * This content is released under the MIT License (MIT)
8
+	 *
9
+	 * Copyright (c) 2014 - 2016, British Columbia Institute of Technology
10
+	 *
11
+	 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
+	 * of this software and associated documentation files (the "Software"), to deal
13
+	 * in the Software without restriction, including without limitation the rights
14
+	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+	 * copies of the Software, and to permit persons to whom the Software is
16
+	 * furnished to do so, subject to the following conditions:
17
+	 *
18
+	 * The above copyright notice and this permission notice shall be included in
19
+	 * all copies or substantial portions of the Software.
20
+	 *
21
+	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+	 * THE SOFTWARE.
28
+	 *
29
+	 * @package	CodeIgniter
30
+	 * @author	EllisLab Dev Team
31
+	 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
32
+	 * @copyright	Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
33
+	 * @license	http://opensource.org/licenses/MIT	MIT License
34
+	 * @link	https://codeigniter.com
35
+	 * @since	Version 1.0.0
36
+	 * @filesource
37
+	 */
38 38
 defined('BASEPATH') OR exit('No direct script access allowed');
39 39
 
40 40
 /**
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestAutoloader.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
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  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
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestFileCache.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@
 block discarded – undo
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
 	}
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  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
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestReflection.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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
 		};
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  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
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestSuperGlobal.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 				// Set $_GET if URI string has query string
32 32
 				parse_str($query_string, $_GET);
33 33
 				// Remove query string from URI string
34
-				$argv = substr($argv, 0, -strlen($query_string)-1);
34
+				$argv = substr($argv, 0, -strlen($query_string) - 1);
35 35
 			}
36 36
 		}
37 37
 
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 		if ($_GET !== [])
65 65
 		{
66 66
 			$_SERVER['REQUEST_URI'] =
67
-				'/' . $path . '?'
67
+				'/'.$path.'?'
68 68
 				. http_build_query($_GET);
69 69
 		}
70 70
 		else
71 71
 		{
72
-			$_SERVER['REQUEST_URI'] = '/' . $path;
72
+			$_SERVER['REQUEST_URI'] = '/'.$path;
73 73
 		}
74 74
 	}
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 		if ($query_string === false)
88 88
 		{
89
-			throw new LogicException('Bad URI string: ' . $uri);
89
+			throw new LogicException('Bad URI string: '.$uri);
90 90
 		}
91 91
 
92 92
 		return $query_string;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		}
112 112
 		else
113 113
 		{
114
-			$key = 'HTTP_' . $normalized_name;
114
+			$key = 'HTTP_'.$normalized_name;
115 115
 		}
116 116
 
117 117
 		$_SERVER[$key] = $value;
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  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
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Autoloader for ci-phpunit-test
12
-require __DIR__ . '/CIPHPUnitTestAutoloader.php';
13
-require __DIR__ . '/CIPHPUnitTestFileCache.php';
12
+require __DIR__.'/CIPHPUnitTestAutoloader.php';
13
+require __DIR__.'/CIPHPUnitTestFileCache.php';
14 14
 $cache = new CIPHPUnitTestFileCache(
15
-	__DIR__ . '/tmp/cache/autoload.php'
15
+	__DIR__.'/tmp/cache/autoload.php'
16 16
 );
17 17
 $autoload_dirs = CIPHPUnitTest::getAutoloadDirs();
18 18
 $autoloader = new CIPHPUnitTestAutoloader($cache, $autoload_dirs);
@@ -20,5 +20,5 @@  discard block
 block discarded – undo
20 20
 
21 21
 // Register CodeIgniter's tests/mocks/autoloader.php
22 22
 define('SYSTEM_PATH', BASEPATH);
23
-require APPPATH .'tests/mocks/autoloader.php';
23
+require APPPATH.'tests/mocks/autoloader.php';
24 24
 spl_autoload_register('autoload');
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/Cache.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 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
 namespace Kenjis\MonkeyPatch;
12 12
 
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
 	}
252 252
 
253 253
 	/**
254
-	* Recursive Unlink
255
-	*
256
-	* @param string $dir
257
-	*/
254
+	 * Recursive Unlink
255
+	 *
256
+	 * @param string $dir
257
+	 */
258 258
 	protected static function recursiveUnlink($dir)
259 259
 	{
260 260
 		if (! is_dir($dir))
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.