for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* this file is part of magerun
*
* @author Tom Klingenberg <https://github.com/ktomk>
*/
namespace N98\Util;
* StringTyped String formatter / parser
* @package N98\Util
abstract class StringTyped
{
* @param string $value
* @return bool
public static function parseBoolOption($value)
return in_array(strtolower($value), array('y', 'yes', 1, 'true'));
}
* @return string
public static function formatActive($value)
if (in_array($value, array(1, 'true'))) {
return 'active';
return 'inactive';