<commit_before><?php namespace SammyK\LaravelFacebookSdk;

use Illuminate\Config\Repository as Config;
use Illuminate\Routing\UrlGenerator as Url;
use Facebook\Facebook;

class LaravelFacebookSdk extends Facebook
{
    /**
     * @var Config
     */
    protected $config_handler;

    /**
     * @var Url
     */
    protected $url;

    /**
     * @param Config  $config_handler
     * @param Url  $url
     * @param array   $config
     */
    public function __construct(Config $config_handler, Url $url, array $config)
    {
        $this->config_handler = $config_handler;
        $this->url = $url;

        // Edited
        $setting = Setting::first();
        if(count($setting) > 0){
            $config['app_id'] = $setting->facebook_app_id;
            $config['app_secret'] = $setting->facebook_app_secret;
        }
        //---

        parent::__construct($config);
    }

    /**
     * Generate an OAuth 2.0 authorization URL for authentication.
     *
     * @param array $scope
     * @param string $callback_url
     *
     * @return string
     */
    public function getLoginUrl(array $scope = [], $callback_url = '')
    {
        $scope = $this->getScope($scope);<commit_msg>Update config setting model<commit_after><?php namespace SammyK\LaravelFacebookSdk;

use Illuminate\Config\Repository as Config;
use Illuminate\Routing\UrlGenerator as Url;
use Facebook\Facebook;

class LaravelFacebookSdk extends Facebook
{
    /**
     * @var Config
     */
    protected $config_handler;

    /**
     * @var Url
     */
    protected $url;

    /**
     * @param Config  $config_handler
     * @param Url  $url
     * @param array   $config
     */
    public function __construct(Config $config_handler, Url $url, array $config)
    {
        $this->config_handler = $config_handler;
        $this->url = $url;

        // Edited
        $setting = App\Models\Setting::first();
        if(count($setting) > 0){
            $config['app_id'] = $setting->facebook_app_id;
            $config['app_secret'] = $setting->facebook_app_secret;
        }
        //---

        parent::__construct($config);
    }

    /**
     * Generate an OAuth 2.0 authorization URL for authentication.
     *
     * @param array $scope
     * @param string $callback_url
     *
     * @return string
     */
    public function getLoginUrl(array $scope = [], $callback_url = '')
    {
        $scope = $this->getScope($scope);
{'fraction_non_alphanumeric': 0.12927130506381226, 'fraction_numerical': 0.002470152326060107, 'mean_word_length': 2.2661290322580645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6072455', 'n_tokens_mistral': 738, 'n_tokens_neox': 723, 'n_words': 160}