atipugin/telegram-bot-ruby

View on GitHub

Showing 28 of 28 total issues

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class BackgroundFillGradient < Base
attribute :type, Types::String.constrained(eql: 'gradient').default('gradient')
attribute :top_color, Types::Integer
Severity: Major
Found in lib/telegram/bot/types/background_fill_gradient.rb and 7 other locations - About 15 mins to fix
lib/telegram/bot/types/paid_media_preview.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_reverse_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_translation_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_unspecified.rb on lines 4..11

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Bot
module Types
class SharedUser < Base
attribute :user_id, Types::Integer
attribute? :first_name, Types::String
Severity: Minor
Found in lib/telegram/bot/types/shared_user.rb and 1 other location - About 15 mins to fix
lib/telegram/bot/types/chat_shared.rb on lines 4..11

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class PassportElementErrorTranslationFile < Base
attribute :source, Types::String.constrained(eql: 'translation_file').default('translation_file')
attribute :type, Types::String
lib/telegram/bot/types/background_fill_gradient.rb on lines 4..11
lib/telegram/bot/types/paid_media_preview.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_reverse_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_unspecified.rb on lines 4..11

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class PassportElementErrorReverseSide < Base
attribute :source, Types::String.constrained(eql: 'reverse_side').default('reverse_side')
attribute :type, Types::String
Severity: Major
Found in lib/telegram/bot/types/passport_element_error_reverse_side.rb and 7 other locations - About 15 mins to fix
lib/telegram/bot/types/background_fill_gradient.rb on lines 4..11
lib/telegram/bot/types/paid_media_preview.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_translation_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_unspecified.rb on lines 4..11

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module Bot
module Types
class ChatShared < Base
attribute :request_id, Types::Integer
attribute :chat_id, Types::Integer
Severity: Minor
Found in lib/telegram/bot/types/chat_shared.rb and 1 other location - About 15 mins to fix
lib/telegram/bot/types/shared_user.rb on lines 4..11

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class PassportElementErrorFile < Base
attribute :source, Types::String.constrained(eql: 'file').default('file')
attribute :type, Types::String
Severity: Major
Found in lib/telegram/bot/types/passport_element_error_file.rb and 7 other locations - About 15 mins to fix
lib/telegram/bot/types/background_fill_gradient.rb on lines 4..11
lib/telegram/bot/types/paid_media_preview.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_reverse_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_translation_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_unspecified.rb on lines 4..11

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class PassportElementErrorUnspecified < Base
attribute :source, Types::String.constrained(eql: 'unspecified').default('unspecified')
attribute :type, Types::String
Severity: Major
Found in lib/telegram/bot/types/passport_element_error_unspecified.rb and 7 other locations - About 15 mins to fix
lib/telegram/bot/types/background_fill_gradient.rb on lines 4..11
lib/telegram/bot/types/paid_media_preview.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_reverse_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_translation_file.rb on lines 4..11

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module Bot
module Types
class PaidMediaPreview < Base
attribute :type, Types::String.constrained(eql: 'preview').default('preview')
attribute? :width, Types::Integer
Severity: Major
Found in lib/telegram/bot/types/paid_media_preview.rb and 7 other locations - About 15 mins to fix
lib/telegram/bot/types/background_fill_gradient.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_front_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_reverse_side.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_selfie.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_translation_file.rb on lines 4..11
lib/telegram/bot/types/passport_element_error_unspecified.rb on lines 4..11
Severity
Category
Status
Source
Language