@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @param string $dot The contents for graphviz |
| 29 | 29 | * @param string $destFile Name with full path to where file is to be created |
| 30 | - * @return bool|string Returns whatever shell_exec returns |
|
| 30 | + * @return false|string Returns whatever shell_exec returns |
|
| 31 | 31 | */ |
| 32 | 32 | protected function _generatePng($dot, $destFile) { |
| 33 | 33 | if (!isset($dot)) { |
@@ -327,13 +327,13 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | public function testOnMethods() { |
| 329 | 329 | $scope = $this; |
| 330 | - $this->Vehicle->onIgnite('before', function ($currentState, $previousState, $transition) use ($scope) { |
|
| 330 | + $this->Vehicle->onIgnite('before', function($currentState, $previousState, $transition) use ($scope) { |
|
| 331 | 331 | $scope->assertEquals("parked", $currentState); |
| 332 | 332 | $scope->assertNull($previousState); |
| 333 | 333 | $scope->assertEquals("ignite", $transition); |
| 334 | 334 | }); |
| 335 | 335 | |
| 336 | - $this->Vehicle->on('ignite', 'after', function ($currentState, $previousState, $transition) use ($scope) { |
|
| 336 | + $this->Vehicle->on('ignite', 'after', function($currentState, $previousState, $transition) use ($scope) { |
|
| 337 | 337 | $scope->assertEquals("idling", $currentState); |
| 338 | 338 | $scope->assertEquals("parked", $previousState); |
| 339 | 339 | $scope->assertEquals("ignite", $transition); |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | public function testWhenMethods() { |
| 355 | - $this->Vehicle->whenStalled(function () { |
|
| 355 | + $this->Vehicle->whenStalled(function() { |
|
| 356 | 356 | $this->assertEquals("stalled", $this->Vehicle->getCurrentState()); |
| 357 | 357 | }); |
| 358 | 358 | |
@@ -366,11 +366,11 @@ discard block |
||
| 366 | 366 | |
| 367 | 367 | public function testBubble() { |
| 368 | 368 | $scope = $this; |
| 369 | - $this->Vehicle->on('ignite', 'before', function () use ($scope) { |
|
| 369 | + $this->Vehicle->on('ignite', 'before', function() use ($scope) { |
|
| 370 | 370 | $scope->assertEquals("parked", $scope->Vehicle->getCurrentState()); |
| 371 | 371 | }, false); |
| 372 | 372 | |
| 373 | - $this->Vehicle->on('transition', 'before', function () use ($scope) { |
|
| 373 | + $this->Vehicle->on('transition', 'before', function() use ($scope) { |
|
| 374 | 374 | // this should never be called |
| 375 | 375 | $scope->assertTrue(false); |
| 376 | 376 | }); |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | public function testCallable() { |
| 658 | - $this->Vehicle->addMethod('whatIsMyName', function (Model $model, $method, $name) { |
|
| 658 | + $this->Vehicle->addMethod('whatIsMyName', function(Model $model, $method, $name) { |
|
| 659 | 659 | return $model->alias . '-' . $method . '-' . $name; |
| 660 | 660 | }); |
| 661 | 661 | |
@@ -663,11 +663,11 @@ discard block |
||
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | public function testExistingCallable() { |
| 666 | - $this->Vehicle->addMethod('foobar', function () { |
|
| 666 | + $this->Vehicle->addMethod('foobar', function() { |
|
| 667 | 667 | }); |
| 668 | 668 | |
| 669 | 669 | $this->setExpectedException('InvalidArgumentException'); |
| 670 | - $this->Vehicle->addMethod('foobar', function () { |
|
| 670 | + $this->Vehicle->addMethod('foobar', function() { |
|
| 671 | 671 | }); |
| 672 | 672 | } |
| 673 | 673 | |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | $this->Vehicle->shiftUp(); |
| 740 | 740 | $this->Vehicle->crash(); |
| 741 | 741 | |
| 742 | - $this->Vehicle->addMethod('hasTools', function ($role) { |
|
| 742 | + $this->Vehicle->addMethod('hasTools', function($role) { |
|
| 743 | 743 | return $role == 'mechanic'; |
| 744 | 744 | }); |
| 745 | 745 | |
@@ -342,7 +342,7 @@ |
||
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | - return (bool)$retval; |
|
| 345 | + return (bool) $retval; |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | /** |