$value) { $ids[] = $key . '(' . $value . ')'; } return new self( 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' ); } /** * Instance for which no identifier can be found */ public static function noIdentifierFound(string $className): self { return new self(sprintf( 'Unable to find "%s" entity identifier associated with the UnitOfWork', $className )); } }