-
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.
Applied rector and php-cs-fixer with php 8.3
- Loading branch information
1 parent
404b288
commit 3d4a75e
Showing
6 changed files
with
23 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @author stev leibelt <[email protected]> | ||
* @since 2014-11-07 | ||
* @since 2014-11-07 | ||
*/ | ||
|
||
namespace Net\Bazzline\Component\ProcessPipe; | ||
|
@@ -12,4 +12,6 @@ | |
* Class ExecutableException | ||
* @package Net\Bazzline\Component\ProcessPipe | ||
*/ | ||
class ExecutableException extends RuntimeException {} | ||
class ExecutableException extends RuntimeException | ||
{ | ||
} |
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-07 | ||
* @since 2014-11-07 | ||
*/ | ||
|
||
namespace Net\Bazzline\Component\ProcessPipe; | ||
|
@@ -13,9 +13,8 @@ | |
interface ExecutableInterface | ||
{ | ||
/** | ||
* @param mixed $input | ||
* @return mixed | ||
* @throws ExecutableException | ||
*/ | ||
public function execute($input = null); | ||
} | ||
public function execute(mixed $input = null); | ||
} |
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-11 | ||
* @since 2014-11-11 | ||
*/ | ||
|
||
namespace Net\Bazzline\Component\ProcessPipe; | ||
|
@@ -12,4 +12,6 @@ | |
* Class InvalidArgumentException | ||
* @package Net\Bazzline\Component\ProcessPipe | ||
*/ | ||
class InvalidArgumentException extends ParentClass {} | ||
class InvalidArgumentException extends ParentClass | ||
{ | ||
} |
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-07 | ||
* @since 2014-11-07 | ||
*/ | ||
|
||
namespace Net\Bazzline\Component\ProcessPipe; | ||
|
@@ -13,21 +13,17 @@ | |
class Pipe implements PipeInterface | ||
{ | ||
/** @var array|ExecutableInterface[] */ | ||
private $processes; | ||
private $processes = []; | ||
|
||
/** | ||
* Adds one or more process to the pipe | ||
* | ||
* @param ExecutableInterface $process - or more | ||
* @param ExecutableInterface $_ [optional] | ||
* @throws InvalidArgumentException | ||
*/ | ||
public function __construct(ExecutableInterface $process = null, $_ = null) | ||
public function __construct() | ||
{ | ||
$this->processes = array(); | ||
|
||
if (func_num_args() > 0) { | ||
call_user_func_array(array($this, 'pipe'), func_get_args()); | ||
call_user_func_array($this->pipe(...), func_get_args()); | ||
} | ||
} | ||
|
||
|
@@ -61,8 +57,8 @@ public function pipe(ExecutableInterface $process, $_ = null) | |
} else { | ||
$message = 'Argument ' . $index . ' passed to ' . __METHOD__ . | ||
'() must implement interface ' . | ||
'Net\Bazzline\Component\ProcessPipe\ExecutableInterface' . | ||
', instance of ' . get_class($process) . ' given'; | ||
\Net\Bazzline\Component\ProcessPipe\ExecutableInterface::class . | ||
', instance of ' . $process::class . ' given'; | ||
throw new InvalidArgumentException($message); | ||
} | ||
} | ||
|
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-07 | ||
* @since 2014-11-07 | ||
*/ | ||
|
||
namespace Net\Bazzline\Component\ProcessPipe; | ||
|
@@ -21,4 +21,4 @@ interface PipeInterface extends ExecutableInterface | |
* @return $this | ||
*/ | ||
public function pipe(ExecutableInterface $process, $_ = null); | ||
} | ||
} |