<commit_before><?php

namespace Actinoids\Modlr\RestOdm\Store;

use Actinoids\Modlr\RestOdm\Exception\AbstractHttpException;

/**
 * Store exceptions.
 *
 * @author <NAME> <<EMAIL>>
 */
class StoreException extends AbstractHttpException
{
    public static function recordNotFound($type, $identifer)
    {
        return new self(
            sprintf(
                'No record was found for "%s" using id "%s"',
                $type,
                $identifer
            ),
            404,
            __FUNCTION__
        );
    }

    public static function badRequest($message = null)
    {
        return new self(
            sprintf(
                'Oops! We were unable to handle database operations for this record. %s',
                $message
            ),
            500,
            __FUNCTION__
        );
    }

    public static function invalidInclude($type, $fieldKey)
    {
        return new self(
            sprintf(
                'The relationship key "%s" was not found on entity "%s"',
                $fieldKey,
                $type
            ),
            400,
            __FUNCTION__
        );
    }

    public static function nyi($type)
    {
        return new self(
            sprintf(
                'Oops! A feature has been accessed while accessing "%s" that has not yet been completed.',
                $type
            ),
            500,
            __FUNCTION__<commit_msg>Slight message adjustment<commit_after><?php

namespace Actinoids\Modlr\RestOdm\Store;

use Actinoids\Modlr\RestOdm\Exception\AbstractHttpException;

/**
 * Store exceptions.
 *
 * @author <NAME> <<EMAIL>>
 */
class StoreException extends AbstractHttpException
{
    public static function recordNotFound($type, $identifer)
    {
        return new self(
            sprintf(
                'No record was found for "%s" using id "%s"',
                $type,
                $identifer
            ),
            404,
            __FUNCTION__
        );
    }

    public static function badRequest($message = null)
    {
        return new self(
            sprintf(
                'Oops! We were unable to handle store operations for this record. %s',
                $message
            ),
            500,
            __FUNCTION__
        );
    }

    public static function invalidInclude($type, $fieldKey)
    {
        return new self(
            sprintf(
                'The relationship key "%s" was not found on entity "%s"',
                $fieldKey,
                $type
            ),
            400,
            __FUNCTION__
        );
    }

    public static function nyi($type)
    {
        return new self(
            sprintf(
                'Oops! A feature has been accessed while accessing "%s" that has not yet been completed.',
                $type
            ),
            500,
            __FUNCTION__
{'fraction_non_alphanumeric': 0.08417391304347827, 'fraction_numerical': 0.008347826086956521, 'mean_word_length': 1.3788254755996692, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5895620', 'n_tokens_mistral': 753, 'n_tokens_neox': 717, 'n_words': 219}