original_string: public function toPHP($value, Driver $driver)
      {
          if ($value === null) {
              return null;
          }
          if (is_string($value)) {
              return $this->convertBinaryUuidToString($value);
          }
          if (is_resource($value)) {
              return $value;
          }
  
          throw new Exception(sprintf('Unable to convert %s into binary uuid.', gettype($value)));
      }
code: public function toPHP($value, Driver $driver)
      {
          if ($value === null) {
              return null;
          }
          if (is_string($value)) {
              return $this->convertBinaryUuidToString($value);
          }
          if (is_resource($value)) {
              return $value;
          }
  
          throw new Exception(sprintf('Unable to convert %s into binary uuid.', gettype($value)));
      }
code_tokens: public function toPHP ( $ value , Driver $ driver ) { if ( $ value === null ) { return null ; } if ( is_string ( $ value ) ) { return $ this -> convertBinaryUuidToString ( $ value ) ; } if ( is_resource ( $ value ) ) { return $ value ; } throw new Exception ( sprintf ( 'Unable to convert %s into binary uuid.' , gettype ( $ value ) ) ) ; }
docstring: Convert binary uuid into resource handles
  
  @param null|string|resource $value The value to convert.
  @param \Cake\Database\Driver $driver The driver instance to convert with.
  @return resource|string|null
  @throws \Cake\Core\Exception\Exception
docstring_tokens: Convert binary uuid into resource handles