for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Chrisyue\PhpM3u8\Dumper;
use Chrisyue\PhpM3u8\Config;
class AttributeListDumper
{
private $valueDumper;
public function __construct(Config $valueDumper)
$this->valueDumper = $valueDumper;
}
public function dump(\ArrayObject $data, array $types)
$result = [];
foreach ($data as $key => $value) {
if (!isset($types[$key])) {
continue;
$type = $types[$key];
$dump = $this->valueDumper->get($type);
$result[] = sprintf('%s=%s', $key, $dump($value));
if (!empty($result)) {
return implode(',', $result);