<commit_before><?php

namespace TBN\SocialBundle\Social;

use \Google_Client;
use \Google_Service_Plus;
use \Google_Moment;
use \Google_ItemScope;

/**
 * Description of Twitter
 *
 * @author guillaume
 */
class Google extends Social {

    /**
     *
     * @var Google_Client $client
     */
    protected $client;

    public function constructClient() {

        $api_id = $this->id;
        $api_secret = $this->secret;

        /*
          $client -> setApplicationName($this->container->getParameter('app_name'));
          $client -> setClientId($this->container->getParameter('google_app_id'));
          $client -> setClientSecret($this->container->getParameter('google_app_secret'));
          $client -> setDeveloperKey("<KEY>"); */

        $this->client = $client = new Google_Client();
        $this->client->setClientId($api_id);
        $this->client->setClientSecret($api_secret);
        $this->client->setDeveloperKey("AIzaSyBETAmun16QLnNnOtEPL4-_n-O3ApO9BEI");
        $this->client->setScopes([
            'https://www.googleapis.com/auth/userinfo.email',
            'https://www.googleapis.com/auth/userinfo.profile',
            'https://www.googleapis.com/auth/plus.me',
            'https://www.googleapis.com/auth/plus.login',
            'https://www.googleapis.com/auth/plus.stream.read',
            'https://www.googleapis.com/auth/plus.stream.write'
        ]);
        //$this->client->authenticate("AIzaSyBETAmun16QLnNnOtEPL4-_n-O3ApO9BEI");
    }

    public function getNumberOfCount() {

        $site = $this->siteManager->getCurrentSite();
        $router = $this->router;

        if ($site !== null) {
            try
            {
                $url = $router->generate("tbn_agenda_index",["subdomain" => $site->getSubdomain()], true);<commit_msg>Fix calcul likes Google+<commit_after><?php

namespace TBN\SocialBundle\Social;

use \Google_Client;
use \Google_Service_Plus;
use \Google_Moment;
use \Google_ItemScope;

/**
 * Description of Twitter
 *
 * @author guillaume
 */
class Google extends Social {

    /**
     *
     * @var Google_Client $client
     */
    protected $client;

    public function constructClient() {

        $api_id = $this->id;
        $api_secret = $this->secret;

        /*
          $client -> setApplicationName($this->container->getParameter('app_name'));
          $client -> setClientId($this->container->getParameter('google_app_id'));
          $client -> setClientSecret($this->container->getParameter('google_app_secret'));
          $client -> setDeveloperKey("<KEY>"); */

        $this->client = $client = new Google_Client();
        $this->client->setClientId($api_id);
        $this->client->setClientSecret($api_secret);
        $this->client->setDeveloperKey("AIzaSyBETAmun16QLnNnOtEPL4-_n-O3ApO9BEI");
        $this->client->setScopes([
            'https://www.googleapis.com/auth/userinfo.email',
            'https://www.googleapis.com/auth/userinfo.profile',
            'https://www.googleapis.com/auth/plus.me',
            'https://www.googleapis.com/auth/plus.login',
            'https://www.googleapis.com/auth/plus.stream.read',
            'https://www.googleapis.com/auth/plus.stream.write'
        ]);
        //$this->client->authenticate("AIzaSyBETAmun16QLnNnOtEPL4-_n-O3ApO9BEI");
    }

    public function getNumberOfCount() {

        $site = $this->siteManager->getCurrentSite();
        $router = $this->router;

        if ($site !== null) {
            try
            {
                $url = $router->generate("tbn_main_index", true);
{'fraction_non_alphanumeric': 0.16104553119730186, 'fraction_numerical': 0.005621135469364812, 'mean_word_length': 2.584088620342397, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 61, 'https://': 12, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7234395', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1084, 'n_words': 141}