original_string: public function exists($value, $attribute = 'name'): bool
      {
          $libraries = $this->getAll();
  
          foreach ($libraries as $lib) {
              if (isset($lib->{$attribute}) && $lib->{$attribute} === $value) {
                  return true;
              }
          }
  
          return false;
      }
code: public function exists($value, $attribute = 'name'): bool
      {
          $libraries = $this->getAll();
  
          foreach ($libraries as $lib) {
              if (isset($lib->{$attribute}) && $lib->{$attribute} === $value) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function exists ( $ value , $ attribute = 'name' ) : bool { $ libraries = $ this -> getAll ( ) ; foreach ( $ libraries as $ lib ) { if ( isset ( $ lib -> { $ attribute } ) && $ lib -> { $ attribute } === $ value ) { return true ; } } return false ; }
docstring: Check if library with certain attribute value exists
  
  @param string $value     Library name
  @param string $attribute Attribute name of library
  
  @return bool
  @throws \Exception
  @throws \GuzzleHttp\Exception\GuzzleException
docstring_tokens: Check if library with certain attribute value exists