for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* parser for PHP serialized boolean
*/
namespace xKerman\Restricted;
* Parser for PHP serialized boolean
class BooleanParser implements ParserInterface
{
* parse given `$source` as PHP serialized boolean
*
* @param Source $source parser input
* @return array
* @throws UnserializeFailedException
public function parse(Source $source)
$result = $source->match('/\Gb:([01]);/');
return array((boolean)$result, $source);
}