<commit_before><?php

namespace Jalle19\VagrantRegistryGenerator\Registry;

use Jalle19\VagrantRegistryGenerator\Registry\Manifest\Manifest;

/**
 * Class Registry
 * @package Jalle19\VagrantRegistryGenerator\Registry
 */
class Registry
{

    /**
     * @var Manifest[]
     */
    private $manifests;


    /**
     * Registry constructor.
     *
     * @param Manifest[] $manifests
     */
    public function __construct(array $manifests)
    {
        $this->manifests = $manifests;
    }


    /**
     * @return Manifest[]
     */
    public function getManifests()
    {
        return $this->manifests;
    }


    /**
     * @return array
     */
    public function getOrganizations()
    {
        $organizations = [];

        foreach ($this->manifests as $manifest) {
            list($organization,) = $manifest->getName();

            if (!in_array($organization, $organizations)) {
                $organizations[] = $organizations;
            }
        }

        return $organizations;
    }

}
<commit_msg>Fix organization count, fixes #5<commit_after><?php

namespace Jalle19\VagrantRegistryGenerator\Registry;

use Jalle19\VagrantRegistryGenerator\Registry\Manifest\Manifest;

/**
 * Class Registry
 * @package Jalle19\VagrantRegistryGenerator\Registry
 */
class Registry
{

    /**
     * @var Manifest[]
     */
    private $manifests;


    /**
     * Registry constructor.
     *
     * @param Manifest[] $manifests
     */
    public function __construct(array $manifests)
    {
        $this->manifests = $manifests;
    }


    /**
     * @return Manifest[]
     */
    public function getManifests()
    {
        return $this->manifests;
    }


    /**
     * @return array
     */
    public function getOrganizations()
    {
        $organizations = [];

        foreach ($this->manifests as $manifest) {
            list($organization,) = explode('/', $manifest->getName());

            if (!in_array($organization, $organizations)) {
                $organizations[] = $organization;
            }
        }

        return $organizations;
    }

}

{'fraction_non_alphanumeric': 0.12835249042145594, 'fraction_numerical': 0.006226053639846743, 'mean_word_length': 2.1040118870728084, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6406067', 'n_tokens_mistral': 645, 'n_tokens_neox': 590, 'n_words': 109}