for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SubjectivePHP\Csv;
use SplFileObject;
/**
* Header strategy which uses the provided headers array.
*/
final class ProvidedHeaderStrategy implements HeaderStrategyInterface
{
* @var array
private $headers;
public function __construct(array $headers)
$this->headers = $headers;
}
public function getHeaders(SplFileObject $fileObject) : array
return $this->headers;
public function isHeaderRow(array $row) : bool
return $row === $this->headers;