Update   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A organization() 11 11 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 Integrations\Connectors\Pipedrive;
4
5
use Log;
6
use App\Models\User;
7
8 View Code Duplication
class Update extends Pipedrive
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...
9
{
10
    public function organization(Organization $organization)
11
    {
12
        // Also simple to update any Pipedrive resource value
13
        $organization = $this->_connection->organizations->update(
14
            1,
15
            [
16
                'name' => $organization->id
17
            ]
18
        );
19
        var_dump($organization->getData());
0 ignored issues
show
Security Debugging Code introduced by
var_dump($organization->getData()); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
20
    }
21
}
22