<commit_before><?php


namespace LizardsAndPumpkins\Projection;

use LizardsAndPumpkins\Context\Context;
use LizardsAndPumpkins\Context\ContextSource;
use LizardsAndPumpkins\Product\Product;
use LizardsAndPumpkins\Product\ProductListingCriteria;
use LizardsAndPumpkins\UrlKey;

class UrlKeyForContextCollector
{
    const URL_KEY_TYPE_LISTING = 'listing';
    const URL_KEY_TYPE_PRODUCT = 'product';
    
    /**
     * @var
     */
    private $contextSource;

    public function __construct(ContextSource $contextSource)
    {
        $this->contextSource = $contextSource;
    }
    
    /**
     * @param Product $product
     * @return UrlKeyForContextCollection
     */
    public function collectProductUrlKeys(Product $product)
    {
        $urlKey = UrlKey::fromString($product->getFirstValueOfAttribute(Product::URL_KEY));<commit_msg>Issue #412: Add missing phpdoc to field<commit_after><?php


namespace LizardsAndPumpkins\Projection;

use LizardsAndPumpkins\Context\Context;
use LizardsAndPumpkins\Context\ContextSource;
use LizardsAndPumpkins\Product\Product;
use LizardsAndPumpkins\Product\ProductListingCriteria;
use LizardsAndPumpkins\UrlKey;

class UrlKeyForContextCollector
{
    const URL_KEY_TYPE_LISTING = 'listing';
    const URL_KEY_TYPE_PRODUCT = 'product';
    
    /**
     * @var ContextSource
     */
    private $contextSource;

    public function __construct(ContextSource $contextSource)
    {
        $this->contextSource = $contextSource;
    }
    
    /**
     * @param Product $product
     * @return UrlKeyForContextCollection
     */
    public function collectProductUrlKeys(Product $product)
    {
        $urlKey = UrlKey::fromString($product->getFirstValueOfAttribute(Product::URL_KEY));
{'fraction_non_alphanumeric': 0.09122401847575058, 'fraction_numerical': 0.0017321016166281756, 'mean_word_length': 4.067251461988304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5926866', 'n_tokens_mistral': 530, 'n_tokens_neox': 521, 'n_words': 88}