<?php

namespace idoit\Module\Cmdb\Component\SyncNormalizer\DataShapes;

use isys_format_json;

class StringShape extends AbstractShape implements ShapeInterface
{
    /**
     * @param $value
     *
     * @return bool
     */
    public function isApplicable($value): bool
    {
        return is_string($value) && !isys_format_json::is_json($value);
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return (string) $this->getValue();
    }
}
