<commit_before><?php
namespace Concrete\Core\Asset;

class AssetGroup
{
    /**
     * @var \Concrete\Core\Asset\AssetPointer[]
     */
    protected $assetPointers = array();

    /**
     * @var Asset[]
     */
    protected $assets = array();

    /**
     * @param AssetPointer $ap
     * @return bool
     */
    public function contains(AssetPointer $ap)
    {
        return array_key_exists($ap->getIdentifier(), $this->assetPointers);
    }

    /**
     * @param AssetGroup $item
     */
    public function addGroup(AssetGroup $item)
    {
        $assetPointers = $item->getAssetPointers();
        foreach ($assetPointers as $assetPointer) {
            if (!$this->contains($assetPointer)) {
                $this->assetPointers[$assetPointer->getIdentifier()] = $assetPointer;
            }
        }
    }

    /**
     * @param Asset $asset
     */
    public function addAsset(Asset $asset)
    {
        // doesn't check anything. this is useful for layouts, etc... other handle-less assets.
        $this->assets[] = $asset;
    }

<commit_msg>isset instead of array_key_exists<commit_after><?php
namespace Concrete\Core\Asset;

class AssetGroup
{
    /**
     * @var \Concrete\Core\Asset\AssetPointer[]
     */
    protected $assetPointers = array();

    /**
     * @var Asset[]
     */
    protected $assets = array();

    /**
     * @param AssetPointer $ap
     * @return bool
     */
    public function contains(AssetPointer $ap)
    {
        return isset($this->assetPointers[$ap->getIdentifier()]);
    }

    /**
     * @param AssetGroup $item
     */
    public function addGroup(AssetGroup $item)
    {
        $assetPointers = $item->getAssetPointers();
        foreach ($assetPointers as $assetPointer) {
            if (!$this->contains($assetPointer)) {
                $this->assetPointers[$assetPointer->getIdentifier()] = $assetPointer;
            }
        }
    }

    /**
     * @param Asset $asset
     */
    public function addAsset(Asset $asset)
    {
        // doesn't check anything. this is useful for layouts, etc... other handle-less assets.
        $this->assets[] = $asset;
    }


{'fraction_non_alphanumeric': 0.14085166120729994, 'fraction_numerical': 0.0, 'mean_word_length': 2.1120815138282385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6630787', 'n_tokens_mistral': 644, 'n_tokens_neox': 613, 'n_words': 132}