Completed
Push — master ( 23095d...54d687 )
by Danilo
02:12
created

ChosenInlineResult   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 19
loc 19
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getQuery() 6 6 2
A getChatID() 6 6 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace PhpBotFramework\Entities;
4
5 View Code Duplication
class ChosenInlineResult implements \ArrayAccess {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
7
    use EntityAccess;
8
9
    public function getQuery() : string {
10
11
        // Get text of the message if any
12
        return isset($this->container['query']) ? $this->container['query'] : null;
13
14
    }
15
16
    public function getChatID() {
17
18
        // Return the chat id
19
        return $this->container['from']['id'];
20
21
    }
22
23
}
24