import axiom without dependency on symfony console
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
This commit is contained in:
8
axiom_src/Reports/FailureReport.php
Normal file
8
axiom_src/Reports/FailureReport.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Enzyme\Axiom\Reports;
|
||||
|
||||
class FailureReport extends SimpleReport
|
||||
{
|
||||
//
|
||||
}
|
||||
27
axiom_src/Reports/ReportInterface.php
Normal file
27
axiom_src/Reports/ReportInterface.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Enzyme\Axiom\Reports;
|
||||
|
||||
interface ReportInterface
|
||||
{
|
||||
/**
|
||||
* Get the human readable message associated with this report.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage();
|
||||
|
||||
/**
|
||||
* Whether this report has additional details.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasDetails();
|
||||
|
||||
/**
|
||||
* Get the additional details associated with this report.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDetails();
|
||||
}
|
||||
30
axiom_src/Reports/SimpleReport.php
Normal file
30
axiom_src/Reports/SimpleReport.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Enzyme\Axiom\Reports;
|
||||
|
||||
class SimpleReport implements ReportInterface
|
||||
{
|
||||
protected $message;
|
||||
protected $details;
|
||||
|
||||
public function __construct($message, $details = [])
|
||||
{
|
||||
$this->message = $message;
|
||||
$this->details = $details;
|
||||
}
|
||||
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
public function hasDetails()
|
||||
{
|
||||
return count($this->details) > 0;
|
||||
}
|
||||
|
||||
public function getDetails()
|
||||
{
|
||||
return $this->details;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user