-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply rectorphp and php-cs-fixer to example and test
- Loading branch information
1 parent
261b0b6
commit 127968c
Showing
12 changed files
with
21 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-08 | ||
* @since 2014-11-08 | ||
*/ | ||
|
||
namespace Example\FailingExecution; | ||
|
@@ -35,10 +35,9 @@ class ProcessTwo implements ExecutableInterface | |
{ | ||
/** | ||
* @param mixed $input | ||
* @return mixed | ||
* @throws \Net\Bazzline\Component\ProcessPipe\ExecutableException | ||
*/ | ||
public function execute($input = null) | ||
public function execute($input = null): never | ||
{ | ||
throw new ExecutableException(__METHOD__ . ' has failed'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-08 | ||
* @since 2014-11-08 | ||
*/ | ||
|
||
namespace Example\InputArray; | ||
|
@@ -51,11 +51,7 @@ public function execute($input = null) | |
} | ||
} | ||
|
||
$input = array( | ||
'name' => 'foo', | ||
'steps' => array(), | ||
'times' => array() | ||
); | ||
$input = ['name' => 'foo', 'steps' => [], 'times' => []]; | ||
$pipe = new Pipe(); | ||
|
||
$pipe->pipe( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-08 | ||
* @since 2014-11-08 | ||
*/ | ||
|
||
namespace Example\InputGenerator; | ||
|
@@ -23,14 +23,7 @@ class DataGeneratorProcess implements ExecutableInterface | |
*/ | ||
public function execute($input = null) | ||
{ | ||
$input = array(); | ||
$input[] = array( | ||
microtime(true), | ||
'debug', | ||
'new generated log data' | ||
); | ||
|
||
return $input; | ||
return [[microtime(true), 'debug', 'new generated log data']]; | ||
} | ||
} | ||
|
||
|
@@ -46,11 +39,7 @@ class ProcessTwo implements ExecutableInterface | |
*/ | ||
public function execute($input = null) | ||
{ | ||
$input[] = array( | ||
microtime(true), | ||
'debug', | ||
'hello world' | ||
); | ||
$input[] = [microtime(true), 'debug', 'hello world']; | ||
|
||
return $input; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-08 | ||
* @since 2014-11-08 | ||
*/ | ||
|
||
namespace Example\InputTransformer; | ||
|
@@ -29,7 +29,7 @@ public function execute($input = null) | |
throw new ExecutableException('input must be instance of object'); | ||
} | ||
|
||
$array = array(); | ||
$array = []; | ||
|
||
foreach (get_object_vars($input) as $property => $value) { | ||
$array[$property] = $value; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-08 | ||
* @since 2014-11-08 | ||
*/ | ||
|
||
namespace Example\NoInput; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters