private static function unboolSchema($schema)
    {
        static $trueSchema;
        static $falseSchema;

        if (null === $trueSchema) {
            $trueSchema = new Schema();
            $trueSchema->__booleanSchema = true;
            $falseSchema = new Schema();
            $falseSchema->not = $trueSchema;
            $falseSchema->__booleanSchema = false;
        }

        if ($schema === true) {
            return $trueSchema;
        } elseif ($schema === false) {
            return $falseSchema;
        } else {
            return $schema;
        }
    }
private static function unboolSchema($schema)
    {
        static $trueSchema;
        static $falseSchema;

        if (null === $trueSchema) {
            $trueSchema = new Schema();
            $trueSchema->__booleanSchema = true;
            $falseSchema = new Schema();
            $falseSchema->not = $trueSchema;
            $falseSchema->__booleanSchema = false;
        }

        if ($schema === true) {
            return $trueSchema;
        } elseif ($schema === false) {
            return $falseSchema;
        } else {
            return $schema;
        }
    }
private static function unboolSchema ( $ schema ) { static $ trueSchema ; static $ falseSchema ; if ( null === $ trueSchema ) { $ trueSchema = new Schema ( ) ; $ trueSchema -> __booleanSchema = true ; $ falseSchema = new Schema ( ) ; $ falseSchema -> not = $ trueSchema ; $ falseSchema -> __booleanSchema = false ; } if ( $ schema === true ) { return $ trueSchema ; } elseif ( $ schema === false ) { return $ falseSchema ; } else { return $ schema ; } }
Resolves boolean schema into Schema instance

@param mixed $schema
@return mixed|Schema
Resolves boolean schema into Schema instance