hotfix: Stubs for structured rewrite
This commit is contained in:
parent
2f1628b7d8
commit
0b5ed81b78
9
src/Exception/HotfixException.php
Normal file
9
src/Exception/HotfixException.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
class HotfixException extends Exception
|
||||
{
|
||||
}
|
7
src/Exception/NotCompatibleException.php
Normal file
7
src/Exception/NotCompatibleException.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Exception;
|
||||
|
||||
class NotCompatibleException extends HotfixException
|
||||
{
|
||||
}
|
7
src/Exception/NotImplementedException.php
Normal file
7
src/Exception/NotImplementedException.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Exception;
|
||||
|
||||
class NotImplementedException extends HotfixException
|
||||
{
|
||||
}
|
7
src/Exception/UnsupportedRunnerException.php
Normal file
7
src/Exception/UnsupportedRunnerException.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Exception;
|
||||
|
||||
class UnsupportedRunnerException extends HotfixException
|
||||
{
|
||||
}
|
24
src/Runner/BashRunner.php
Normal file
24
src/Runner/BashRunner.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Runner;
|
||||
|
||||
use NoccyLabs\Hotfix\System\Facts;
|
||||
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||
|
||||
/**
|
||||
* Run hotfixes written in BASH/DASH script.
|
||||
*
|
||||
*
|
||||
*/
|
||||
class BashRunner implements RunnerInterface
|
||||
{
|
||||
|
||||
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||
{
|
||||
}
|
||||
|
||||
public function apply()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
24
src/Runner/PhpRunner.php
Normal file
24
src/Runner/PhpRunner.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Runner;
|
||||
|
||||
use NoccyLabs\Hotfix\System\Facts;
|
||||
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||
|
||||
/**
|
||||
* Run hotfixes written in PHP
|
||||
*
|
||||
*
|
||||
*/
|
||||
class PhpRunner implements RunnerInterface
|
||||
{
|
||||
|
||||
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||
{
|
||||
}
|
||||
|
||||
public function apply()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
25
src/Runner/PythonRunner.php
Normal file
25
src/Runner/PythonRunner.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Runner;
|
||||
|
||||
use NoccyLabs\Hotfix\System\Facts;
|
||||
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||
|
||||
/**
|
||||
* Run hotfixes written in Python.
|
||||
*
|
||||
*
|
||||
*/
|
||||
class PythonRunner implements RunnerInterface
|
||||
{
|
||||
|
||||
public function prepare(Hotfix $hotfix, Facts $facts)
|
||||
{
|
||||
throw new NotImplementedException("The Python runner is not implemented");
|
||||
}
|
||||
|
||||
public function apply()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
19
src/Runner/RunnerFactory.php
Normal file
19
src/Runner/RunnerFactory.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Runner;
|
||||
|
||||
use NoccyLabs\Hotfix\System\Facts;
|
||||
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||
use NoccyLabs\Hotfix\Exception\UnsupportedRunnerException;
|
||||
use NoccyLabs\Hotfix\Exception\NotCompatibleException;
|
||||
|
||||
class RunnerFactory
|
||||
{
|
||||
public static function createRunner(Hotfix $hotfix)
|
||||
{
|
||||
$facts = Facts::getSystemFacts();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
14
src/Runner/RunnerInterface.php
Normal file
14
src/Runner/RunnerInterface.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Hotfix\Runner;
|
||||
|
||||
use NoccyLabs\Hotfix\System\Facts;
|
||||
use NoccyLabs\Hotfix\Hotfix\Hotfix;
|
||||
|
||||
|
||||
interface RunnerInterface
|
||||
{
|
||||
|
||||
public function applyHotfix(Hotfix $hotfix, Facts $facts);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user