original_string: public function hasInstalledPackage($packageName)
      {
          foreach ($this->contents['packages'] as $packageDetails) {
              if ($packageName === $packageDetails['name']) {
                  return true;
              }
          }
          
          return false;
      }
code: public function hasInstalledPackage($packageName)
      {
          foreach ($this->contents['packages'] as $packageDetails) {
              if ($packageName === $packageDetails['name']) {
                  return true;
              }
          }
          
          return false;
      }
code_tokens: public function hasInstalledPackage ( $ packageName ) { foreach ( $ this -> contents [ 'packages' ] as $ packageDetails ) { if ( $ packageName === $ packageDetails [ 'name' ] ) { return true ; } } return false ; }
docstring: Check if a package name has been installed in any version.
  
  @param string $packageName
  @return bool
docstring_tokens: Check if a package name has been installed in any version .