@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | else { |
| 70 | 70 | throw new InvalidArgumentException( |
| 71 | - 'Template file could not be loaded.' |
|
| 71 | + 'Template file could not be loaded.' |
|
| 72 | 72 | ); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -120,14 +120,14 @@ discard block |
||
| 120 | 120 | $error = error_get_last(); |
| 121 | 121 | |
| 122 | 122 | throw new RuntimeException( |
| 123 | - sprintf( |
|
| 123 | + sprintf( |
|
| 124 | 124 | 'Could not write to %s: %s', |
| 125 | 125 | $target, |
| 126 | 126 | substr( |
| 127 | - $error['message'], |
|
| 128 | - strpos($error['message'], ':') + 2 |
|
| 127 | + $error['message'], |
|
| 128 | + strpos($error['message'], ':') + 2 |
|
| 129 | + ) |
|
| 129 | 130 | ) |
| 130 | - ) |
|
| 131 | 131 | ); |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | * @var array |
| 20 | 20 | */ |
| 21 | 21 | private static $times = array( |
| 22 | - 'hour' => 3600000, |
|
| 23 | - 'minute' => 60000, |
|
| 24 | - 'second' => 1000 |
|
| 22 | + 'hour' => 3600000, |
|
| 23 | + 'minute' => 60000, |
|
| 24 | + 'second' => 1000 |
|
| 25 | 25 | ); |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -62,40 +62,40 @@ |
||
| 62 | 62 | public function secondsProvider() |
| 63 | 63 | { |
| 64 | 64 | return array( |
| 65 | - array('0 ms', 0), |
|
| 66 | - array('1 ms', .001), |
|
| 67 | - array('10 ms', .01), |
|
| 68 | - array('100 ms', .1), |
|
| 69 | - array('999 ms', .999), |
|
| 70 | - array('1 second', .9999), |
|
| 71 | - array('1 second', 1), |
|
| 72 | - array('2 seconds', 2), |
|
| 73 | - array('59.9 seconds', 59.9), |
|
| 74 | - array('59.99 seconds', 59.99), |
|
| 75 | - array('59.99 seconds', 59.999), |
|
| 76 | - array('1 minute', 59.9999), |
|
| 77 | - array('59 seconds', 59.001), |
|
| 78 | - array('59.01 seconds', 59.01), |
|
| 79 | - array('1 minute', 60), |
|
| 80 | - array('1.01 minutes', 61), |
|
| 81 | - array('2 minutes', 120), |
|
| 82 | - array('2.01 minutes', 121), |
|
| 83 | - array('59.99 minutes', 3599.9), |
|
| 84 | - array('59.99 minutes', 3599.99), |
|
| 85 | - array('59.99 minutes', 3599.999), |
|
| 86 | - array('1 hour', 3599.9999), |
|
| 87 | - array('59.98 minutes', 3599.001), |
|
| 88 | - array('59.98 minutes', 3599.01), |
|
| 89 | - array('1 hour', 3600), |
|
| 90 | - array('1 hour', 3601), |
|
| 91 | - array('1 hour', 3601.9), |
|
| 92 | - array('1 hour', 3601.99), |
|
| 93 | - array('1 hour', 3601.999), |
|
| 94 | - array('1 hour', 3601.9999), |
|
| 95 | - array('1.01 hours', 3659.9999), |
|
| 96 | - array('1.01 hours', 3659.001), |
|
| 97 | - array('1.01 hours', 3659.01), |
|
| 98 | - array('2 hours', 7199.9999), |
|
| 65 | + array('0 ms', 0), |
|
| 66 | + array('1 ms', .001), |
|
| 67 | + array('10 ms', .01), |
|
| 68 | + array('100 ms', .1), |
|
| 69 | + array('999 ms', .999), |
|
| 70 | + array('1 second', .9999), |
|
| 71 | + array('1 second', 1), |
|
| 72 | + array('2 seconds', 2), |
|
| 73 | + array('59.9 seconds', 59.9), |
|
| 74 | + array('59.99 seconds', 59.99), |
|
| 75 | + array('59.99 seconds', 59.999), |
|
| 76 | + array('1 minute', 59.9999), |
|
| 77 | + array('59 seconds', 59.001), |
|
| 78 | + array('59.01 seconds', 59.01), |
|
| 79 | + array('1 minute', 60), |
|
| 80 | + array('1.01 minutes', 61), |
|
| 81 | + array('2 minutes', 120), |
|
| 82 | + array('2.01 minutes', 121), |
|
| 83 | + array('59.99 minutes', 3599.9), |
|
| 84 | + array('59.99 minutes', 3599.99), |
|
| 85 | + array('59.99 minutes', 3599.999), |
|
| 86 | + array('1 hour', 3599.9999), |
|
| 87 | + array('59.98 minutes', 3599.001), |
|
| 88 | + array('59.98 minutes', 3599.01), |
|
| 89 | + array('1 hour', 3600), |
|
| 90 | + array('1 hour', 3601), |
|
| 91 | + array('1 hour', 3601.9), |
|
| 92 | + array('1 hour', 3601.99), |
|
| 93 | + array('1 hour', 3601.999), |
|
| 94 | + array('1 hour', 3601.9999), |
|
| 95 | + array('1.01 hours', 3659.9999), |
|
| 96 | + array('1.01 hours', 3659.001), |
|
| 97 | + array('1.01 hours', 3659.01), |
|
| 98 | + array('2 hours', 7199.9999), |
|
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -297,10 +297,10 @@ discard block |
||
| 297 | 297 | { |
| 298 | 298 | if ($this->includes === null) { |
| 299 | 299 | $this->includes = array( |
| 300 | - 'require_once' => array(), |
|
| 301 | - 'require' => array(), |
|
| 302 | - 'include_once' => array(), |
|
| 303 | - 'include' => array() |
|
| 300 | + 'require_once' => array(), |
|
| 301 | + 'require' => array(), |
|
| 302 | + 'include_once' => array(), |
|
| 303 | + 'include' => array() |
|
| 304 | 304 | ); |
| 305 | 305 | |
| 306 | 306 | foreach ($this->tokens as $token) { |
@@ -369,29 +369,29 @@ discard block |
||
| 369 | 369 | $interfaceEndLine = $token->getEndLine(); |
| 370 | 370 | |
| 371 | 371 | $this->interfaces[$interface] = array( |
| 372 | - 'methods' => array(), |
|
| 373 | - 'parent' => $token->getParent(), |
|
| 374 | - 'keywords' => $token->getKeywords(), |
|
| 375 | - 'docblock' => $token->getDocblock(), |
|
| 376 | - 'startLine' => $token->getLine(), |
|
| 377 | - 'endLine' => $interfaceEndLine, |
|
| 378 | - 'package' => $token->getPackage(), |
|
| 379 | - 'file' => $this->filename |
|
| 372 | + 'methods' => array(), |
|
| 373 | + 'parent' => $token->getParent(), |
|
| 374 | + 'keywords' => $token->getKeywords(), |
|
| 375 | + 'docblock' => $token->getDocblock(), |
|
| 376 | + 'startLine' => $token->getLine(), |
|
| 377 | + 'endLine' => $interfaceEndLine, |
|
| 378 | + 'package' => $token->getPackage(), |
|
| 379 | + 'file' => $this->filename |
|
| 380 | 380 | ); |
| 381 | 381 | break; |
| 382 | 382 | |
| 383 | 383 | case 'PHP_Token_CLASS': |
| 384 | 384 | case 'PHP_Token_TRAIT': |
| 385 | 385 | $tmp = array( |
| 386 | - 'methods' => array(), |
|
| 387 | - 'parent' => $token->getParent(), |
|
| 388 | - 'interfaces'=> $token->getInterfaces(), |
|
| 389 | - 'keywords' => $token->getKeywords(), |
|
| 390 | - 'docblock' => $token->getDocblock(), |
|
| 391 | - 'startLine' => $token->getLine(), |
|
| 392 | - 'endLine' => $token->getEndLine(), |
|
| 393 | - 'package' => $token->getPackage(), |
|
| 394 | - 'file' => $this->filename |
|
| 386 | + 'methods' => array(), |
|
| 387 | + 'parent' => $token->getParent(), |
|
| 388 | + 'interfaces'=> $token->getInterfaces(), |
|
| 389 | + 'keywords' => $token->getKeywords(), |
|
| 390 | + 'docblock' => $token->getDocblock(), |
|
| 391 | + 'startLine' => $token->getLine(), |
|
| 392 | + 'endLine' => $token->getEndLine(), |
|
| 393 | + 'package' => $token->getPackage(), |
|
| 394 | + 'file' => $this->filename |
|
| 395 | 395 | ); |
| 396 | 396 | |
| 397 | 397 | if ($token instanceof PHP_Token_CLASS) { |
@@ -411,14 +411,14 @@ discard block |
||
| 411 | 411 | case 'PHP_Token_FUNCTION': |
| 412 | 412 | $name = $token->getName(); |
| 413 | 413 | $tmp = array( |
| 414 | - 'docblock' => $token->getDocblock(), |
|
| 415 | - 'keywords' => $token->getKeywords(), |
|
| 416 | - 'visibility'=> $token->getVisibility(), |
|
| 417 | - 'signature' => $token->getSignature(), |
|
| 418 | - 'startLine' => $token->getLine(), |
|
| 419 | - 'endLine' => $token->getEndLine(), |
|
| 420 | - 'ccn' => $token->getCCN(), |
|
| 421 | - 'file' => $this->filename |
|
| 414 | + 'docblock' => $token->getDocblock(), |
|
| 415 | + 'keywords' => $token->getKeywords(), |
|
| 416 | + 'visibility'=> $token->getVisibility(), |
|
| 417 | + 'signature' => $token->getSignature(), |
|
| 418 | + 'startLine' => $token->getLine(), |
|
| 419 | + 'endLine' => $token->getEndLine(), |
|
| 420 | + 'ccn' => $token->getCCN(), |
|
| 421 | + 'file' => $this->filename |
|
| 422 | 422 | ); |
| 423 | 423 | |
| 424 | 424 | if (empty($class) && |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | $this->assertEquals(array(), $this->functions[0]->getArguments()); |
| 44 | 44 | |
| 45 | 45 | $this->assertEquals( |
| 46 | - array('$baz' => 'Baz'), $this->functions[1]->getArguments() |
|
| 46 | + array('$baz' => 'Baz'), $this->functions[1]->getArguments() |
|
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | 49 | $this->assertEquals( |
| 50 | - array('$foobar' => 'Foobar'), $this->functions[2]->getArguments() |
|
| 50 | + array('$foobar' => 'Foobar'), $this->functions[2]->getArguments() |
|
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | 53 | $this->assertEquals( |
| 54 | - array('$barfoo' => 'Barfoo'), $this->functions[3]->getArguments() |
|
| 54 | + array('$barfoo' => 'Barfoo'), $this->functions[3]->getArguments() |
|
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | 57 | $this->assertEquals(array(), $this->functions[4]->getArguments()); |
@@ -103,13 +103,13 @@ discard block |
||
| 103 | 103 | $this->assertNull($this->functions[0]->getDocblock()); |
| 104 | 104 | |
| 105 | 105 | $this->assertEquals( |
| 106 | - "/**\n * @param Baz \$baz\n */", |
|
| 107 | - $this->functions[1]->getDocblock() |
|
| 106 | + "/**\n * @param Baz \$baz\n */", |
|
| 107 | + $this->functions[1]->getDocblock() |
|
| 108 | 108 | ); |
| 109 | 109 | |
| 110 | 110 | $this->assertEquals( |
| 111 | - "/**\n * @param Foobar \$foobar\n */", |
|
| 112 | - $this->functions[2]->getDocblock() |
|
| 111 | + "/**\n * @param Foobar \$foobar\n */", |
|
| 112 | + $this->functions[2]->getDocblock() |
|
| 113 | 113 | ); |
| 114 | 114 | |
| 115 | 115 | $this->assertNull($this->functions[3]->getDocblock()); |
@@ -124,23 +124,23 @@ discard block |
||
| 124 | 124 | $i = $ts->getInterfaces(); |
| 125 | 125 | |
| 126 | 126 | $this->assertEquals( |
| 127 | - 'foo($a, array $b, array $c = array())', |
|
| 128 | - $f['foo']['signature'] |
|
| 127 | + 'foo($a, array $b, array $c = array())', |
|
| 128 | + $f['foo']['signature'] |
|
| 129 | 129 | ); |
| 130 | 130 | |
| 131 | 131 | $this->assertEquals( |
| 132 | - 'm($a, array $b, array $c = array())', |
|
| 133 | - $c['c']['methods']['m']['signature'] |
|
| 132 | + 'm($a, array $b, array $c = array())', |
|
| 133 | + $c['c']['methods']['m']['signature'] |
|
| 134 | 134 | ); |
| 135 | 135 | |
| 136 | 136 | $this->assertEquals( |
| 137 | - 'm($a, array $b, array $c = array())', |
|
| 138 | - $c['a']['methods']['m']['signature'] |
|
| 137 | + 'm($a, array $b, array $c = array())', |
|
| 138 | + $c['a']['methods']['m']['signature'] |
|
| 139 | 139 | ); |
| 140 | 140 | |
| 141 | 141 | $this->assertEquals( |
| 142 | - 'm($a, array $b, array $c = array())', |
|
| 143 | - $i['i']['methods']['m']['signature'] |
|
| 142 | + 'm($a, array $b, array $c = array())', |
|
| 143 | + $i['i']['methods']['m']['signature'] |
|
| 144 | 144 | ); |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | public function testGetIncludes() |
| 38 | 38 | { |
| 39 | 39 | $this->assertSame( |
| 40 | - array('test4.php', 'test3.php', 'test2.php', 'test1.php'), |
|
| 41 | - $this->ts->getIncludes() |
|
| 40 | + array('test4.php', 'test3.php', 'test2.php', 'test1.php'), |
|
| 41 | + $this->ts->getIncludes() |
|
| 42 | 42 | ); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | public function testGetIncludesCategorized() |
| 50 | 50 | { |
| 51 | 51 | $this->assertSame( |
| 52 | - array( |
|
| 52 | + array( |
|
| 53 | 53 | 'require_once' => array('test4.php'), |
| 54 | 54 | 'require' => array('test3.php'), |
| 55 | 55 | 'include_once' => array('test2.php'), |
| 56 | 56 | 'include' => array('test1.php') |
| 57 | - ), |
|
| 58 | - $this->ts->getIncludes(TRUE) |
|
| 57 | + ), |
|
| 58 | + $this->ts->getIncludes(TRUE) |
|
| 59 | 59 | ); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | public function testGetIncludesCategory() |
| 67 | 67 | { |
| 68 | 68 | $this->assertSame( |
| 69 | - array('test4.php'), |
|
| 70 | - $this->ts->getIncludes(TRUE, 'require_once') |
|
| 69 | + array('test4.php'), |
|
| 70 | + $this->ts->getIncludes(TRUE, 'require_once') |
|
| 71 | 71 | ); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function testGetName() |
| 29 | 29 | { |
| 30 | 30 | $tokenStream = new PHP_Token_Stream( |
| 31 | - TEST_FILES_PATH . 'classInNamespace.php' |
|
| 31 | + TEST_FILES_PATH . 'classInNamespace.php' |
|
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | 34 | foreach ($tokenStream as $token) { |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class Test { |
| 3 | - public function methodOne() { |
|
| 4 | - $foo = new class { |
|
| 5 | - public function method_in_anonymous_class() { |
|
| 6 | - return true; |
|
| 7 | - } |
|
| 8 | - }; |
|
| 3 | + public function methodOne() { |
|
| 4 | + $foo = new class { |
|
| 5 | + public function method_in_anonymous_class() { |
|
| 6 | + return true; |
|
| 7 | + } |
|
| 8 | + }; |
|
| 9 | 9 | |
| 10 | - return $foo->method_in_anonymous_class(); |
|
| 11 | - } |
|
| 10 | + return $foo->method_in_anonymous_class(); |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public function methodTwo() { |
|
| 14 | - return false; |
|
| 15 | - } |
|
| 13 | + public function methodTwo() { |
|
| 14 | + return false; |
|
| 15 | + } |
|
| 16 | 16 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Some comment |
|
| 4 | - */ |
|
| 3 | + * Some comment |
|
| 4 | + */ |
|
| 5 | 5 | class Foo{function foo(){} |
| 6 | 6 | |
| 7 | 7 | /** |