<commit_before><?php

namespace SocialiteProviders\Generators\Contexts;

use Illuminate\Support\Collection;

class Stub
{
    /**
     * Create a new stub instance.
     *
     * @param $properties
     */
    public function __construct($properties)
    {
        $this->properties = new Collection($properties);
    }

    /**
     * Author name.
     *
     * @return string
     */
    public function authorName()
    {
        return $this->properties->get('authorName');
    }

    /**
     * Author email.
     *
     * @return string
     */
    public function authorMail()
    {
        return $this->properties->get('authorMail');
    }

    /**
     * Name in lowercase.
     *
     * @return string
     */
    public function nameLowerCase()
    {
        return strtolower($this->properties->get('name'));
    }

    /**
     * Name in StudlyCase.
     *
     * @return string
     */
    public function nameStudlyCase()
    {
        return studly_case($this->properties->get('name'));
    }

    /**
     * Name in UPPERCASE.
     *
     * @return string
     */
    public function nameUpperCase()
    {
        return strtoupper($this->properties->get('name'));
    }

    /**
     * OAuth Version.
     *
     * @return string
     */
    public function oauthVersion()
    {
        return ($this->properties->get('oauthVersion') === 'oauth1') ? 'OAuth1' : 'OAuth2';
    }

    /**
     * Scopes.
     *
     * @return string
     */
    public function scopes()
    {
        $scopes = $this->properties->get('scopes');

        if (str_contains($scopes, ',')) {
            $scopes = explode(',', $this->properties->get('scopes'));

            return implode("', '", $scopes);
        }
<commit_msg>Added compatible with Laravel 6.0.<commit_after><?php

namespace SocialiteProviders\Generators\Contexts;

use Illuminate\Support\Collection;

class Stub
{
    /**
     * Create a new stub instance.
     *
     * @param $properties
     */
    public function __construct($properties)
    {
        $this->properties = new Collection($properties);
    }

    /**
     * Author name.
     *
     * @return string
     */
    public function authorName()
    {
        return $this->properties->get('authorName');
    }

    /**
     * Author email.
     *
     * @return string
     */
    public function authorMail()
    {
        return $this->properties->get('authorMail');
    }

    /**
     * Name in lowercase.
     *
     * @return string
     */
    public function nameLowerCase()
    {
        return strtolower($this->properties->get('name'));
    }

    /**
     * Name in StudlyCase.
     *
     * @return string
     */
    public function nameStudlyCase()
    {
        $laravel = app();
        if (substr($laravel::VERSION, 0, 1) === '6') {
            return \Illuminate\Support\Str::studly($this->properties->get('name'));
        }
        return studly_case($this->properties->get('name'));
    }

    /**
     * Name in UPPERCASE.
     *
     * @return string
     */
    public function nameUpperCase()
    {
        return strtoupper($this->properties->get('name'));
    }

    /**
     * OAuth Version.
     *
     * @return string
     */
    public function oauthVersion()
    {
        return ($this->properties->get('oauthVersion') === 'oauth1') ? 'OAuth1' : 'OAuth2';
    }

    /**
     * Scopes.
     *
     * @return string
     */
    public function scopes()
    {
        $scopes = $this->properties->get('scopes');

        $laravel = app();
        if (substr($laravel::VERSION, 0, 1) === '6') {
            $multipleScopes = \Illuminate\Support\Str::contains($scopes, ',');
        } else {
            $multipleScopes = str_contains($scopes, ',');
        }

        if ($multipleScopes) {
            $scopes = explode(',', $this->properties->get('scopes'));

            return implode("', '", $scopes);
        }

{'fraction_non_alphanumeric': 0.1566606544704973, 'fraction_numerical': 0.003607317701623293, 'mean_word_length': 1.8628318584070795, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '6680006', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1166, 'n_words': 217}