src/Robo/Commands/Blt/AliasCommand.php
protected function getAliasInfo() {
    $alias_length = NULL;
    $alias = NULL;
    $config_file = $this->getInspector()->getCliConfigFile();
    $contents = file_get_contents($config_file);
    $needle = 'function blt() {';
    $begin_alias_pos = strpos($contents, $needle);
    $end_alias_pos = $this->getClosingBracketPosition($contents, $begin_alias_pos + strlen($needle));
    $canonical_alias = file_get_contents($this->getConfigValue('blt.root') . '/scripts/blt/alias');

    if (!is_null($end_alias_pos)) {
      $alias_length = $end_alias_pos - $begin_alias_pos + 1;
      $alias = substr($contents, $begin_alias_pos, $alias_length);
    }

    return [
      'config_file' => $config_file,
      'contents' => $contents,
      'start_pos' => $begin_alias_pos,
      'end_pos' => $end_alias_pos,
      'length' => $alias_length,
      'alias' => $alias,
      'canonical_alias' => $canonical_alias,
    ];
  }
protected function getAliasInfo() {
    $alias_length = NULL;
    $alias = NULL;
    $config_file = $this->getInspector()->getCliConfigFile();
    $contents = file_get_contents($config_file);
    $needle = 'function blt() {';
    $begin_alias_pos = strpos($contents, $needle);
    $end_alias_pos = $this->getClosingBracketPosition($contents, $begin_alias_pos + strlen($needle));
    $canonical_alias = file_get_contents($this->getConfigValue('blt.root') . '/scripts/blt/alias');

    if (!is_null($end_alias_pos)) {
      $alias_length = $end_alias_pos - $begin_alias_pos + 1;
      $alias = substr($contents, $begin_alias_pos, $alias_length);
    }

    return [
      'config_file' => $config_file,
      'contents' => $contents,
      'start_pos' => $begin_alias_pos,
      'end_pos' => $end_alias_pos,
      'length' => $alias_length,
      'alias' => $alias,
      'canonical_alias' => $canonical_alias,
    ];
  }
protected function getAliasInfo ( ) { $ alias_length = NULL ; $ alias = NULL ; $ config_file = $ this -> getInspector ( ) -> getCliConfigFile ( ) ; $ contents = file_get_contents ( $ config_file ) ; $ needle = 'function blt() {' ; $ begin_alias_pos = strpos ( $ contents , $ needle ) ; $ end_alias_pos = $ this -> getClosingBracketPosition ( $ contents , $ begin_alias_pos + strlen ( $ needle ) ) ; $ canonical_alias = file_get_contents ( $ this -> getConfigValue ( 'blt.root' ) . '/scripts/blt/alias' ) ; if ( ! is_null ( $ end_alias_pos ) ) { $ alias_length = $ end_alias_pos - $ begin_alias_pos + 1 ; $ alias = substr ( $ contents , $ begin_alias_pos , $ alias_length ) ; } return [ 'config_file' => $ config_file , 'contents' => $ contents , 'start_pos' => $ begin_alias_pos , 'end_pos' => $ end_alias_pos , 'length' => $ alias_length , 'alias' => $ alias , 'canonical_alias' => $ canonical_alias , ] ; }
Gets information about the installed BLT alias.

@return array
An array of information about the installed BLT alias.
Gets information about the installed BLT alias .