<commit_before><?php
/**
 * Created by PhpStorm.
 * User: Colin
 * Date: 25.07.2017
 * Time: 10:32
 * 
 * Provides functions to modify component entities in
 * the database.
 * 
 */

namespace AppBundle\Entity\Repository;


use AppBundle\Entity\Component;
use AppBundle\Entity\ComponentType;
use AppBundle\Entity\ManagedConnection;

class ComponentRepository
{
    /**
     * Creates the component in the database
     * and adds it to the database.
     * @return array
     * @throws \Exception
     */
    public static function getAllComponents()
    {
        $managedConnection = new ManagedConnection();
        $connection = $managedConnection->getConnection();

        $query = "SELECT * FROM komponenten;";
        $result = $connection->query($query);

        if($query->error)<commit_msg>Hotfix<commit_after><?php
/**
 * Created by PhpStorm.
 * User: Colin
 * Date: 25.07.2017
 * Time: 10:32
 * 
 * Provides functions to modify component entities in
 * the database.
 * 
 */

namespace AppBundle\Entity\Repository;


use AppBundle\Entity\Component;
use AppBundle\Entity\ComponentType;
use AppBundle\Entity\ManagedConnection;

class ComponentRepository
{
    /**
     * Creates the component in the database
     * and adds it to the database.
     * @return array
     * @throws \Exception
     */
    public static function getAllComponents()
    {
        $managedConnection = new ManagedConnection();
        $connection = $managedConnection->getConnection();

        $query = "SELECT * FROM komponenten;";
        $result = $connection->query($query);

        if($result === false)
{'fraction_non_alphanumeric': 0.11180512179887571, 'fraction_numerical': 0.014990630855715179, 'mean_word_length': 3.0251256281407035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '5447728', 'n_tokens_mistral': 462, 'n_tokens_neox': 436, 'n_words': 122}