Talentica/AndroidWithKotlin

View on GitHub

Showing 83 of 83 total issues

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

constructor(comment: Comment) {
id = comment.id
productId = comment.productId
text = comment.text
postedAt = comment.postedAt
app/src/main/java/com/talentica/androidkotlin/db/entity/ProductEntity.kt on lines 31..36

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

constructor(product: Product) {
id = product.id
name = product.name
description = product.description
price = product.price
app/src/main/java/com/talentica/androidkotlin/db/entity/CommentEntity.kt on lines 43..48

Method createChannel has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

fun createChannel(id: String?, name: CharSequence?, importance: Int,
showBadge: Boolean, group: String, color: Int, vibrationPattern: LongArray) {

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

    override fun onBindViewHolder(holder: CommentViewHolder, position: Int) {
    holder.binding.comment = mCommentList!![position]
    holder.binding.executePendingBindings()
    }
    app/src/main/java/com/talentica/androidkotlin/ui/ProductAdapter.kt on lines 87..90

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

    override fun onBindViewHolder(holder: ProductViewHolder, position: Int) {
    holder.binding.product = mProductList!![position]
    holder.binding.executePendingBindings()
    }
    app/src/main/java/com/talentica/androidkotlin/ui/CommentAdapter.kt on lines 85..88

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

    fun e(tag: String, t: Throwable, vararg messages: Any) {
    log(tag, Log.ERROR, t, *messages)
    }
    audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 51..53

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

    fun w(tag: String, t: Throwable, vararg messages: Any) {
    log(tag, Log.WARN, t, *messages)
    }
    audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 59..61

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

    class CameraActivity : SlowkaActivity<CameraActivityView>(), CameraActivityView ,
    HasComponent<CameraActivityComponent?>, View.OnClickListener {
    customcamera/src/main/java/com/talentica/androidkotlin/customcamera/ui/landing/LandingActivity.kt on lines 26..27

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

    class LandingActivity : SlowkaActivity<LandingActivityView>(), LandingActivityView,
    HasComponent<LandingActivityComponent?>, AdapterView.OnItemClickListener {
    customcamera/src/main/java/com/talentica/androidkotlin/customcamera/ui/camera/CameraActivity.kt on lines 21..22

    Method createChannel has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    fun createChannel(id: String, name: CharSequence, importance: Int, showBadge: Boolean,
    group: String = "Personal", vibrationPattern: LongArray = longArrayOf
    (100, 200, 300, 100, 200, 300, 100, 200, 300))

      Method createChannel has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      override fun createChannel(id: String, name: CharSequence, importance: Int, showBadge:
      Boolean, group: String, vibrationPattern: LongArray) {

        Method createNotification has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        fun createNotification(channelId: String, title: String, body: String, ticker: String, onGoing:
        Boolean, color: Int): Int {

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

          fun e(tag: String, vararg messages: Any) {
          log(tag, Log.ERROR, null, *messages)
          }
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 43..45
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 47..49

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

          fun w(tag: String, vararg messages: Any) {
          log(tag, Log.WARN, null, *messages)
          }
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 43..45
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 55..57

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

          fun i(tag: String, vararg messages: Any) {
          log(tag, Log.INFO, null, *messages)
          }
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 47..49
          audioplayer/src/main/java/com/talentica/androidkotlin/audioplayer/utils/LogHelper.kt on lines 55..57

          Method createNotification has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          override fun createNotification(channel: String, title: String, body: String, onGoing:
          Boolean, color: Int) {

            Method createNotification has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            fun createNotification(channel: String, title: String, body: String, onGoing: Boolean,
            color: Int = Color.GREEN)

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

              override fun createChannel(id: String, name: CharSequence, importance: Int, showBadge:
              Boolean, group: String, vibrationPattern: LongArray) {
              o_notifications/src/main/java/com/talentica/androidkotlin/onotifications/utils/NotificationHelper.kt on lines 52..53

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

              fun createNotification(channelId: String, title: String, body: String, ticker: String, onGoing:
              Boolean, color: Int): Int {
              o_notifications/src/main/java/com/talentica/androidkotlin/onotifications/notifications/NotificationPresenter.kt on lines 51..52

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

              } else {
              view.displayError(context.getString(R.string.some_error_occured))
              view.hideLoading()
              view.destroy()
              }
              networking/src/main/java/com/talentica/androidkotlin/networking/repoui/RepoPresenter.kt on lines 86..90
              Severity
              Category
              Status
              Source
              Language