original_string: protected function bin($program = '')
      {
          // Get list of allowed search paths
          if ($location = $this->config()->get('binary_location')) {
              $locations = [$location];
          } else {
              $locations = $this->config()->get('search_binary_locations');
          }
  
          // Find program in each path
          foreach ($locations as $location) {
              $path = "{$location}/{$program}";
              if (file_exists($path)) {
                  return $path;
              }
              if (file_exists($path . '.exe')) {
                  return $path . '.exe';
              }
          }
  
          // Not found
          return null;
      }
code: protected function bin($program = '')
      {
          // Get list of allowed search paths
          if ($location = $this->config()->get('binary_location')) {
              $locations = [$location];
          } else {
              $locations = $this->config()->get('search_binary_locations');
          }
  
          // Find program in each path
          foreach ($locations as $location) {
              $path = "{$location}/{$program}";
              if (file_exists($path)) {
                  return $path;
              }
              if (file_exists($path . '.exe')) {
                  return $path . '.exe';
              }
          }
  
          // Not found
          return null;
      }
code_tokens: protected function bin ( $ program = '' ) { // Get list of allowed search paths if ( $ location = $ this -> config ( ) -> get ( 'binary_location' ) ) { $ locations = [ $ location ] ; } else { $ locations = $ this -> config ( ) -> get ( 'search_binary_locations' ) ; } // Find program in each path foreach ( $ locations as $ location ) { $ path = "{$location}/{$program}" ; if ( file_exists ( $ path ) ) { return $ path ; } if ( file_exists ( $ path . '.exe' ) ) { return $ path . '.exe' ; } } // Not found return null ; }
docstring: Accessor to get the location of the binary
  
  @param string $program Name of binary
  @return string
docstring_tokens: Accessor to get the location of the binary