for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Coco\SourceWatcher\Core;
use Coco\SourceWatcher\Core\Extractors\CsvExtractor;
use Coco\SourceWatcher\Core\Extractors\JsonExtractor;
use Coco\SourceWatcher\Core\IO\Inputs\Input;
/**
* Class Extractor
*
* @package Coco\SourceWatcher\Core
*/
abstract class Extractor extends Step
{
protected ?Input $input = null;
public function getInput () : Input
return $this->input;
return $this->input
null
Coco\SourceWatcher\Core\IO\Inputs\Input
}
public function setInput ( ?Input $input ) : void
$this->input = $input;
public abstract function extract ();
public function getArrayRepresentation () : array
$result = parent::getArrayRepresentation();
if ( $this instanceof CsvExtractor || $this instanceof JsonExtractor ) {
$fileInput = $this->getInput();
$result["input"] = [ "class" => get_class( $fileInput ), "location" => $fileInput->getInput() ];
return $result;