<commit_before><?php
namespace WoohooLabs\Yin\JsonApi\Exception;

use Psr\Http\Message\ResponseInterface;
use WoohooLabs\Yin\JsonApi\Request\RequestInterface;

class ExceptionFactory implements ExceptionFactoryInterface
{
    /**
     * @inheritDoc
     */
    public function createClientGeneratedIdNotSupportedException(RequestInterface $request, $currentId)
    {
        return new ClientGeneratedIdNotSupported($currentId);
    }

    /**
     * @inheritDoc
     */
    public function createClientGeneratedIdAlreadyExistsException(RequestInterface $request, $currentId)
    {
        return new ClientGeneratedIdAlreadyExists($currentId);
    }

    /**
     * @inheritDoc
     */
    public function createFullReplacementProhibitedException($relationshipName)
    {
        return new FullReplacementProhibited($relationshipName);
    }

    /**
     * @inheritDoc
     */
    public function createInclusionUnsupportedException(RequestInterface $request)
    {
        return new InclusionUnsupported();
    }

    /**
     * @inheritDoc
     */
    public function createInclusionUnrecognizedException(RequestInterface $request, array $unrecognizedInclusions)
    {
        return new InclusionUnrecognized($unrecognizedInclusions);
    }

    /**
     * @inheritDoc
     */
    public function createMediaTypeUnacceptableException(RequestInterface $request, $mediaTypeName)
    {
        return new MediaTypeUnacceptable($mediaTypeName);
    }

    /**
     * @inheritDoc
     */
    public function createMediaTypeUnsupportedException(RequestInterface $request, $mediaTypeName)
    {
        return new MediaTypeUnsupported($mediaTypeName);
    }

    /**
     * @inheritDoc
     */
    public function createQueryParamUnrecognizedException(RequestInterface $request, $queryParamName)
    {
        return new QueryParamUnrecognized($queryParamName);
    }

    /**
     * @inheritDoc
     */
    public function createRelationshipTypeInappropriateException(
        $relationshipName,
        $currentRelationshipType,
        $expectedRelationshipType
    ) {
        return new RelationshipTypeInappropriate(
            $relationshipName,
            $currentRelationshipType,
            $expectedRelationshipType
        );
    }

    /**
     * @inheritDoc
     */
    public function createRemovalProhibitedException($relationshipName)
    {
        return new RemovalProhibited($relationshipName);
    }

    /**
     * @inheritDoc
     */
    public function createRequestBodyInvalidJsonException(
        RequestInterface $request,
        $lintMessage,
        $includeOriginalBody
    )
    {
        return new RequestBodyInvalidJson($request, $lintMessage, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createRequestBodyInvalidJsonApiException(
        RequestInterface $request,
        array $validationErrors,
        $includeOriginalBody
    )
    {
        return new RequestBodyInvalidJsonApi($request, $validationErrors, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createResourceIdInvalidException($id)
    {
        return new ResourceIdInvalid($id);
    }

    /**
     * @inheritDoc
     */
    public function createResourceIdMissingException()
    {
        return new ResourceIdMissing();
    }

    /**
     * @inheritDoc
     */
    public function createResourceTypeMissingException()
    {
        return new ResourceTypeMissing();
    }

    /**
     * @inheritDoc
     */
    public function createResourceTypeUnacceptableException($currentType, array $acceptedTypes)
    {
        return new ResourceTypeUnacceptable($currentType, $acceptedTypes);
    }

    /**
     * @inheritDoc
     */
    public function createResponseBodyInvalidJsonException(
        ResponseInterface $response,
        $lintMessage,
        $includeOriginalBody
    )
    {
        return new ResponseBodyInvalidJson($response, $lintMessage, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createResponseBodyInvalidJsonApiException(
        ResponseInterface $response,
        array $validationErrors,
        $includeOriginalBody
    )
    {
        return new ResponseBodyInvalidJsonApi($response, $validationErrors, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createSortingUnsupportedException(RequestInterface $request)
    {
        return new SortingUnsupported();
    }

    /**
     * @inheritDoc
     */
    public function createSortParamUnrecognizedException(RequestInterface $request, $paramName)
    {
        return new SortParamUnrecognized($paramName);
    }
}
<commit_msg>Fixed bracket issue<commit_after><?php
namespace WoohooLabs\Yin\JsonApi\Exception;

use Psr\Http\Message\ResponseInterface;
use WoohooLabs\Yin\JsonApi\Request\RequestInterface;

class ExceptionFactory implements ExceptionFactoryInterface
{
    /**
     * @inheritDoc
     */
    public function createClientGeneratedIdNotSupportedException(RequestInterface $request, $currentId)
    {
        return new ClientGeneratedIdNotSupported($currentId);
    }

    /**
     * @inheritDoc
     */
    public function createClientGeneratedIdAlreadyExistsException(RequestInterface $request, $currentId)
    {
        return new ClientGeneratedIdAlreadyExists($currentId);
    }

    /**
     * @inheritDoc
     */
    public function createFullReplacementProhibitedException($relationshipName)
    {
        return new FullReplacementProhibited($relationshipName);
    }

    /**
     * @inheritDoc
     */
    public function createInclusionUnsupportedException(RequestInterface $request)
    {
        return new InclusionUnsupported();
    }

    /**
     * @inheritDoc
     */
    public function createInclusionUnrecognizedException(RequestInterface $request, array $unrecognizedInclusions)
    {
        return new InclusionUnrecognized($unrecognizedInclusions);
    }

    /**
     * @inheritDoc
     */
    public function createMediaTypeUnacceptableException(RequestInterface $request, $mediaTypeName)
    {
        return new MediaTypeUnacceptable($mediaTypeName);
    }

    /**
     * @inheritDoc
     */
    public function createMediaTypeUnsupportedException(RequestInterface $request, $mediaTypeName)
    {
        return new MediaTypeUnsupported($mediaTypeName);
    }

    /**
     * @inheritDoc
     */
    public function createQueryParamUnrecognizedException(RequestInterface $request, $queryParamName)
    {
        return new QueryParamUnrecognized($queryParamName);
    }

    /**
     * @inheritDoc
     */
    public function createRelationshipTypeInappropriateException(
        $relationshipName,
        $currentRelationshipType,
        $expectedRelationshipType
    ) {
        return new RelationshipTypeInappropriate(
            $relationshipName,
            $currentRelationshipType,
            $expectedRelationshipType
        );
    }

    /**
     * @inheritDoc
     */
    public function createRemovalProhibitedException($relationshipName)
    {
        return new RemovalProhibited($relationshipName);
    }

    /**
     * @inheritDoc
     */
    public function createRequestBodyInvalidJsonException(
        RequestInterface $request,
        $lintMessage,
        $includeOriginalBody
    ) {
        return new RequestBodyInvalidJson($request, $lintMessage, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createRequestBodyInvalidJsonApiException(
        RequestInterface $request,
        array $validationErrors,
        $includeOriginalBody
    ) {
        return new RequestBodyInvalidJsonApi($request, $validationErrors, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createResourceIdInvalidException($id)
    {
        return new ResourceIdInvalid($id);
    }

    /**
     * @inheritDoc
     */
    public function createResourceIdMissingException()
    {
        return new ResourceIdMissing();
    }

    /**
     * @inheritDoc
     */
    public function createResourceTypeMissingException()
    {
        return new ResourceTypeMissing();
    }

    /**
     * @inheritDoc
     */
    public function createResourceTypeUnacceptableException($currentType, array $acceptedTypes)
    {
        return new ResourceTypeUnacceptable($currentType, $acceptedTypes);
    }

    /**
     * @inheritDoc
     */
    public function createResponseBodyInvalidJsonException(
        ResponseInterface $response,
        $lintMessage,
        $includeOriginalBody
    ) {
        return new ResponseBodyInvalidJson($response, $lintMessage, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createResponseBodyInvalidJsonApiException(
        ResponseInterface $response,
        array $validationErrors,
        $includeOriginalBody
    ) {
        return new ResponseBodyInvalidJsonApi($response, $validationErrors, $includeOriginalBody);
    }

    /**
     * @inheritDoc
     */
    public function createSortingUnsupportedException(RequestInterface $request)
    {
        return new SortingUnsupported();
    }

    /**
     * @inheritDoc
     */
    public function createSortParamUnrecognizedException(RequestInterface $request, $paramName)
    {
        return new SortParamUnrecognized($paramName);
    }
}

{'fraction_non_alphanumeric': 0.08403001071811361, 'fraction_numerical': 0.0, 'mean_word_length': 2.776203966005666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6260125', 'n_tokens_mistral': 2400, 'n_tokens_neox': 2324, 'n_words': 408}