original_string: protected function generateId(): int
      {
          if ($this->getId() !== null) {
              return $this->getId();
          }
  
          $maxIdLength = \mb_strlen((string) PHP_INT_MAX) - 1;
  
          // try generate unique id for file
          $id = mb_substr(crc32($this->getModelId()), $maxIdLength - self::ID_PATH_HASH_LENGTH)
              . mb_substr(crc32($this->getActualPath()), self::ID_PATH_HASH_LENGTH);
  
          return (int) $id;
      }
code: protected function generateId(): int
      {
          if ($this->getId() !== null) {
              return $this->getId();
          }
  
          $maxIdLength = \mb_strlen((string) PHP_INT_MAX) - 1;
  
          // try generate unique id for file
          $id = mb_substr(crc32($this->getModelId()), $maxIdLength - self::ID_PATH_HASH_LENGTH)
              . mb_substr(crc32($this->getActualPath()), self::ID_PATH_HASH_LENGTH);
  
          return (int) $id;
      }
code_tokens: protected function generateId ( ) : int { if ( $ this -> getId ( ) !== null ) { return $ this -> getId ( ) ; } $ maxIdLength = \ mb_strlen ( ( string ) PHP_INT_MAX ) - 1 ; // try generate unique id for file $ id = mb_substr ( crc32 ( $ this -> getModelId ( ) ) , $ maxIdLength - self :: ID_PATH_HASH_LENGTH ) . mb_substr ( crc32 ( $ this -> getActualPath ( ) ) , self :: ID_PATH_HASH_LENGTH ) ; return ( int ) $ id ; }
docstring: Returns existed id or generate unique id based on model id and file path.
  @return int
docstring_tokens: Returns existed id or generate unique id based on model id and file path .