<commit_before><?php namespace Kironuniversity\Subscribe;

use Backend;
use System\Classes\PluginBase;
use Symfony\Component\Console\Output\ConsoleOutput;
/**
* subscribe Plugin Information File
*/
class Plugin extends PluginBase
{

  /**
  * Returns information about this plugin.
  *
  * @return array
  */
  public function pluginDetails()
  {
    return [
      'name'        => 'Subscribe',
      'description' => 'Plugin to manage SnedGrid Newsletter Subscribers',
      'author'      => 'kironuniversity',
      'icon'        => 'icon-mail'
    ];
  }

  public function register()
  {
    set_exception_handler([$this, 'handleException']);
    $this->registerConsoleCommand('kironuniversity.upsg', 'Kironuniversity\Subscribe\Console\UpdateSendGrid');
  }

  public function handleException($e)
  {
    if (! $e instanceof Exception) {
      $e = new \Symfony\Component\Debug\Exception\FatalThrowableError($e);
    }

    $handler = $this->app->make('Illuminate\Contracts\Debug\ExceptionHandler');
    $handler->report($e);

    if ($this->app->runningInConsole()) {
      $handler->renderForConsole(new ConsoleOutput, $e);
    } else {
      $handler->render($this->app['request'], $e)->send();
    }
  }

  /**
  * Registers any front-end components implemented in this plugin.
  *
  * @return array
  */
  public function registerComponents()
  {

    return [
      'Kironuniversity\Subscribe\Components\SubscribeForm' => 'SubscribeForm',
    ];
  }

  /**
  * Registers any back-end permissions used by this plugin.
  *
  * @return array
  */
  public function registerPermissions()
  {
    return []; // Remove this line to activate

    return [
      'kironuniversity.subscribe.some_permission' => [
        'tab' => 'subscribe',
        'label' => 'Some permission'
      ],
    ];
  }


  /**
  * Registers back-end navigation items for this plugin.
  *
  * @return array
  */
  public function registerNavigation()
  {
    return []; // Remove this line to activate

    return [
      'subscribe' => [
        'label'       => 'subscribe',
        'url'         => Backend::url('kironuniversity/subscribe/mycontroller'),
        'icon'        => 'icon-leaf',
        'permissions' => ['kironuniversity.subscribe.*'],
        'order'       => 500,
      ],
    ];
  }

  public function registerMailTemplates()
  {
    return [
      'kironuniversity.subscribe::mail.confirm' => 'Activation mail sent to subscribers.',
    ];
  }

}
<commit_msg>Test Commit<commit_after><?php namespace Kironuniversity\Subscribe;

use Backend;
use System\Classes\PluginBase;
use Symfony\Component\Console\Output\ConsoleOutput;
/**
* subscribe Plugin Information File
*/
class Plugin extends PluginBase
{

  /**
  * Returns information about this plugin.
  *
  * @return array
  */
  public function pluginDetails()
  {
    return [
      'name'        => 'Subscribe',
      'description' => 'Plugin to manage SnedGrid Newsletter Subscribers',
      'author'      => 'kironuniversity',
      'icon'        => 'icon-mail'
    ];
  }


  public function register()
  {
    set_exception_handler([$this, 'handleException']);
    $this->registerConsoleCommand('kironuniversity.upsg', 'Kironuniversity\Subscribe\Console\UpdateSendGrid');
  }

  public function handleException($e)
  {
    if (! $e instanceof Exception) {
      $e = new \Symfony\Component\Debug\Exception\FatalThrowableError($e);
    }

    $handler = $this->app->make('Illuminate\Contracts\Debug\ExceptionHandler');
    $handler->report($e);

    if ($this->app->runningInConsole()) {
      $handler->renderForConsole(new ConsoleOutput, $e);
    } else {
      $handler->render($this->app['request'], $e)->send();
    }
  }

  /**
  * Registers any front-end components implemented in this plugin.
  *
  * @return array
  */
  public function registerComponents()
  {

    return [
      'Kironuniversity\Subscribe\Components\SubscribeForm' => 'SubscribeForm',
    ];
  }

  /**
  * Registers any back-end permissions used by this plugin.
  *
  * @return array
  */
  public function registerPermissions()
  {
    return []; // Remove this line to activate

    return [
      'kironuniversity.subscribe.some_permission' => [
        'tab' => 'subscribe',
        'label' => 'Some permission'
      ],
    ];
  }


  /**
  * Registers back-end navigation items for this plugin.
  *
  * @return array
  */
  public function registerNavigation()
  {
    return []; // Remove this line to activate

    return [
      'subscribe' => [
        'label'       => 'subscribe',
        'url'         => Backend::url('kironuniversity/subscribe/mycontroller'),
        'icon'        => 'icon-leaf',
        'permissions' => ['kironuniversity.subscribe.*'],
        'order'       => 500,
      ],
    ];
  }

  public function registerMailTemplates()
  {
    return [
      'kironuniversity.subscribe::mail.confirm' => 'Activation mail sent to subscribers.',
    ];
  }

}

{'fraction_non_alphanumeric': 0.1413197969543147, 'fraction_numerical': 0.001218274111675127, 'mean_word_length': 2.7403189066059226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '5704401', 'n_tokens_mistral': 1485, 'n_tokens_neox': 1437, 'n_words': 303}