<commit_before><?php

namespace PlaceFinder\DomainBundle\Provider;

use PlaceFinder\DomainBundle\Exception\PlaceNotFoundException;
use PlaceFinder\DomainBundle\Manager\PlaceManager;

/**
 * Class PlaceProvider
 *
 * @package PlaceFinder\DomainBundle\Provider
 */
class PlaceProvider implements PlaceProviderInterface
{
    /** @var PlaceManager */
    protected $placeManager;

    /**
     * Construct
     *
     * @param PlaceManager $placeManager
     */
    public function __construct(PlaceManager $placeManager)
    {
        $this->placeManager = $placeManager;
    }

    /**
     * @param int $placeId
     *
     * @return Place
     *
     * @throws PlaceNotFoundException
     */
    public function load($placeId)
    {
        $place = $this->placeManager->load($placeId);

        if (null === $place) {
            throw new PlaceNotFoundException(sprintf('The place "%s" doesn\'t exist', $placeId));
        }

        return $place;
    }
}<commit_msg>Improve PlaceProviderInterfaceException message<commit_after><?php

namespace PlaceFinder\DomainBundle\Provider;

use PlaceFinder\DomainBundle\Exception\PlaceNotFoundException;
use PlaceFinder\DomainBundle\Manager\PlaceManager;

/**
 * Class PlaceProvider
 *
 * @package PlaceFinder\DomainBundle\Provider
 */
class PlaceProvider implements PlaceProviderInterface
{
    /** @var PlaceManager */
    protected $placeManager;

    /**
     * Construct
     *
     * @param PlaceManager $placeManager
     */
    public function __construct(PlaceManager $placeManager)
    {
        $this->placeManager = $placeManager;
    }

    /**
     * @param int $placeId
     *
     * @return Place
     *
     * @throws PlaceNotFoundException
     */
    public function load($placeId)
    {
        $place = $this->placeManager->load($placeId);

        if (null === $place) {
            throw new PlaceNotFoundException(sprintf('The place "#%s" doesn\'t exist', $placeId));
        }

        return $place;
    }
}
{'fraction_non_alphanumeric': 0.11380880121396054, 'fraction_numerical': 0.0, 'mean_word_length': 2.811175337186898, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5709401', 'n_tokens_mistral': 539, 'n_tokens_neox': 540, 'n_words': 110}