-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Plugin\Runner from abstract class to interface
- Loading branch information
Showing
4 changed files
with
85 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of CaptainHook | ||
* | ||
* (c) Sebastian Feldmann <sf@sebastian-feldmann.info> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CaptainHook\App\Plugin\Runner; | ||
|
||
use CaptainHook\App\Config; | ||
use CaptainHook\App\Console\IO; | ||
use CaptainHook\App\Plugin; | ||
use SebastianFeldmann\Git\Repository; | ||
|
||
/** | ||
* Base runner plugin abstract class | ||
* | ||
* @package CaptainHook | ||
* @author Sebastian Feldmann <sf@sebastian-feldmann.info> | ||
* @link https://github.com/captainhookphp/captainhook | ||
* @since Class available since Release 5.9.0. | ||
*/ | ||
abstract class Base implements Plugin\Runner | ||
{ | ||
/** | ||
* @var Config | ||
*/ | ||
protected $config; | ||
|
||
/** | ||
* @var IO | ||
*/ | ||
protected $io; | ||
|
||
/** | ||
* @var Repository | ||
*/ | ||
protected $repository; | ||
|
||
/** | ||
* @var Config\Plugin | ||
*/ | ||
protected $plugin; | ||
|
||
public function configure(Config $config, IO $io, Repository $repository, Config\Plugin $plugin): void | ||
{ | ||
$this->config = $config; | ||
$this->io = $io; | ||
$this->repository = $repository; | ||
$this->plugin = $plugin; | ||
} | ||
} |
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