code: public function hasExtension(string $extension): bool
      {
          $test = $this->getExtension();
          return (strcasecmp($extension, $test) === 0);
      }
docs: Determine if the entity has a given extension
  
  @param string $extension
  @return bool