<commit_before><?php

namespace Terminus\Commands;

use Terminus;
use Terminus\Auth;
use Terminus\Session;
use Terminus\Utils;
use Terminus\Commands\TerminusCommand;
use Terminus\Helpers\Input;
use Terminus\Models\Organization;
use Terminus\Models\Site;
use Terminus\Models\Upstreams;
use Terminus\Models\User;
use Terminus\Models\Workflow;
use Terminus\Models\Collections\Sites;

/**
 * Actions on multiple sites
 */
class SitesCommand extends TerminusCommand {
  public $sites;

  /**
   * Shows a list of your sites on Pantheon
   *
   * @return [SitesCommand] $this
   */
  public function __construct() {
    Auth::ensureLogin();
    parent::__construct();
    $this->sites = new Sites();
  }

  /**
   * Print and save drush aliases
   *
   * ## OPTIONS
   *
   * [--print]
   * : print aliases to screen
   *
   * [--location=<location>]
   * : Specify the the full path, including the filename, to the alias file
   *   you wish to create. Without this option a default of
   *   '~/.drush/pantheon.aliases.drushrc.php' will be used.
   */
  public function aliases($args, $assoc_args) {
    $user     = new User(new stdClass(), array());
    $print    = Input::optional('print', $assoc_args, false);
    $location = Input::optional(
      'location',
      $assoc_args,
      getenv('HOME') . '/.drush/pantheon.aliases.drushrc.php'
    );

    if (is_dir($location)) {
      $message  = 'Please provide a full path with filename,';
      $message .= ' e.g. {location}/pantheon.aliases.drushrc.php';
      $this->failure($message, compact('location'));
    }

    $file_exists = file_exists($location);

    // Create the directory if it doesn't yet exist
    $dirname = dirname($location);
    if (!is_dir($dirname)) {
      mkdir($dirname, 0700, true);
    }
<commit_msg>Fix 'Fatal error: Class 'Terminus\Commands\stdClass' not found in ...php/Terminus/Commands/SitesCommand.php on line 49<commit_after><?php

namespace Terminus\Commands;

use Terminus;
use Terminus\Auth;
use Terminus\Session;
use Terminus\Utils;
use Terminus\Commands\TerminusCommand;
use Terminus\Helpers\Input;
use Terminus\Models\Organization;
use Terminus\Models\Site;
use Terminus\Models\Upstreams;
use Terminus\Models\User;
use Terminus\Models\Workflow;
use Terminus\Models\Collections\Sites;

/**
 * Actions on multiple sites
 */
class SitesCommand extends TerminusCommand {
  public $sites;

  /**
   * Shows a list of your sites on Pantheon
   *
   * @return [SitesCommand] $this
   */
  public function __construct() {
    Auth::ensureLogin();
    parent::__construct();
    $this->sites = new Sites();
  }

  /**
   * Print and save drush aliases
   *
   * ## OPTIONS
   *
   * [--print]
   * : print aliases to screen
   *
   * [--location=<location>]
   * : Specify the the full path, including the filename, to the alias file
   *   you wish to create. Without this option a default of
   *   '~/.drush/pantheon.aliases.drushrc.php' will be used.
   */
  public function aliases($args, $assoc_args) {
    $user     = new User(new \stdClass(), array());
    $print    = Input::optional('print', $assoc_args, false);
    $location = Input::optional(
      'location',
      $assoc_args,
      getenv('HOME') . '/.drush/pantheon.aliases.drushrc.php'
    );

    if (is_dir($location)) {
      $message  = 'Please provide a full path with filename,';
      $message .= ' e.g. {location}/pantheon.aliases.drushrc.php';
      $this->failure($message, compact('location'));
    }

    $file_exists = file_exists($location);

    // Create the directory if it doesn't yet exist
    $dirname = dirname($location);
    if (!is_dir($dirname)) {
      mkdir($dirname, 0700, true);
    }

{'fraction_non_alphanumeric': 0.13794983642311887, 'fraction_numerical': 0.0027262813522355507, 'mean_word_length': 3.1979405034324944, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3854439', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1192, 'n_words': 301}