chan-sccp/PAMI

View on GitHub

Showing 132 of 498 total issues

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

    public function getCapabilities()
    {
        $ret = array();
        $codecs=explode(", ", substr($this->getKey('Capabilities'), 1, -1));
        foreach ($codecs as $codec) {
Severity: Major
Found in src/PAMI/Message/Event/SCCPShowDeviceEvent.php and 4 other locations - About 1 hr to fix
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 270..279
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 283..292
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 299..308
src/PAMI/Message/Response/SCCPShowGlobalsResponse.php on lines 356..365

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getCapabilities()
    {
        $ret = array();
        $codecs=explode(", ", substr($this->getEventKey('Capabilities'), 1, -1));
        foreach ($codecs as $codec) {
Severity: Major
Found in src/PAMI/Message/Response/SCCPShowDeviceResponse.php and 4 other locations - About 1 hr to fix
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 254..263
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 270..279
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 299..308
src/PAMI/Message/Response/SCCPShowGlobalsResponse.php on lines 356..365

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getCodecsPreference()
    {
        $ret = array();
        $codecs=explode(", ", substr($this->getEventKey('CodecsPreference'), 1, -1));
        foreach ($codecs as $codec) {
Severity: Major
Found in src/PAMI/Message/Response/SCCPShowDeviceResponse.php and 4 other locations - About 1 hr to fix
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 254..263
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 270..279
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 283..292
src/PAMI/Message/Response/SCCPShowGlobalsResponse.php on lines 356..365

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getCodecsPreference()
    {
        $ret = array();
        $codecs=explode(", ", substr($this->getKey('CodecsPreference'), 1, -1));
        foreach ($codecs as $codec) {
Severity: Major
Found in src/PAMI/Message/Response/SCCPShowGlobalsResponse.php and 4 other locations - About 1 hr to fix
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 254..263
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 270..279
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 283..292
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 299..308

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getCodecsPreference()
    {
        $ret = array();
        $codecs=explode(", ", substr($this->getKey('CodecsPreference'), 1, -1));
        foreach ($codecs as $codec) {
Severity: Major
Found in src/PAMI/Message/Event/SCCPShowDeviceEvent.php and 4 other locations - About 1 hr to fix
src/PAMI/Message/Event/SCCPShowDeviceEvent.php on lines 254..263
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 283..292
src/PAMI/Message/Response/SCCPShowDeviceResponse.php on lines 299..308
src/PAMI/Message/Response/SCCPShowGlobalsResponse.php on lines 356..365

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 119.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * AuthList Event
 * isListEntry and Part Action: PJSIPShowAuths
 *
Severity: Major
Found in src/PAMI/Message/Event/AuthListEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/CallAnsweredEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..127
src/PAMI/Message/Event/JoinEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when .. ?
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/ConfbridgeEndEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/AuthListEvent.php on lines 1..150
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/CallAnsweredEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..127
src/PAMI/Message/Event/JoinEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when the 'SCCP Call Answered' Event arrives.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/CallAnsweredEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/AuthListEvent.php on lines 1..150
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..127
src/PAMI/Message/Event/JoinEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when .. ?
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/ConfbridgeStartEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/AuthListEvent.php on lines 1..150
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/CallAnsweredEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..127
src/PAMI/Message/Event/JoinEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when .. ?
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/JoinEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/AuthListEvent.php on lines 1..150
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/CallAnsweredEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered for the end of the list when an action BridgeInfo is issued.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/BridgeInfoCompleteEvent.php and 5 other locations - About 1 hr to fix
src/PAMI/Message/Event/AuthListEvent.php on lines 1..150
src/PAMI/Message/Event/CallAnsweredEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..127
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..127
src/PAMI/Message/Event/JoinEvent.php on lines 1..127

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 117.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * SCCPMessageDevices action message.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Action/SCCPMessageDevicesAction.php and 1 other location - About 1 hr to fix
src/PAMI/Message/Action/SCCPSystemMessageAction.php on lines 1..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * SCCPSystemMessage action message.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Action/SCCPSystemMessageAction.php and 1 other location - About 1 hr to fix
src/PAMI/Message/Action/SCCPMessageDevicesAction.php on lines 1..69

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 116.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getChannelVariables($channel = null)
    {
        if (is_null($channel)) {
            if (!isset($this->keys['channel'])) {
                return $this->getChannelVariables('default');
Severity: Major
Found in src/PAMI/Message/IncomingMessage.php and 1 other location - About 1 hr to fix
src/PAMI/Message/IncomingMessage.php on lines 156..171

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public function getStatusVariables($channel = null)
    {
        if (is_null($channel)) {
            if (!isset($this->keys['channel'])) {
                return $this->getStatusVariables('default');
Severity: Major
Found in src/PAMI/Message/IncomingMessage.php and 1 other location - About 1 hr to fix
src/PAMI/Message/IncomingMessage.php on lines 117..132

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when a bridged channel is unlinked.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/UnlinkEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.php on lines 1..117
src/PAMI/Message/Event/AgentsEvent.php on lines 1..117
src/PAMI/Message/Event/BridgeCreateEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeDestroyEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeListItemEvent.php on lines 1..117
src/PAMI/Message/Event/CallForwardEvent.php on lines 1..117
src/PAMI/Message/Event/DTMFEvent.php on lines 1..117
src/PAMI/Message/Event/FAXSessionsEntryEvent.php on lines 1..138
src/PAMI/Message/Event/HangupEvent.php on lines 1..117
src/PAMI/Message/Event/IdentifyDetailEvent.php on lines 1..138
src/PAMI/Message/Event/LinkEvent.php on lines 1..117
src/PAMI/Message/Event/ListDialplanEvent.php on lines 1..117
src/PAMI/Message/Event/RTCPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPSenderStatEvent.php on lines 1..117
src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.php on lines 1..117

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when exchanging rtp stats.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/RTPSenderStatEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.php on lines 1..117
src/PAMI/Message/Event/AgentsEvent.php on lines 1..117
src/PAMI/Message/Event/BridgeCreateEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeDestroyEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeListItemEvent.php on lines 1..117
src/PAMI/Message/Event/CallForwardEvent.php on lines 1..117
src/PAMI/Message/Event/DTMFEvent.php on lines 1..117
src/PAMI/Message/Event/FAXSessionsEntryEvent.php on lines 1..138
src/PAMI/Message/Event/HangupEvent.php on lines 1..117
src/PAMI/Message/Event/IdentifyDetailEvent.php on lines 1..138
src/PAMI/Message/Event/LinkEvent.php on lines 1..117
src/PAMI/Message/Event/ListDialplanEvent.php on lines 1..117
src/PAMI/Message/Event/RTCPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.php on lines 1..117
src/PAMI/Message/Event/UnlinkEvent.php on lines 1..117

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * FAXSessionsEntry Event
 *
 *
Severity: Major
Found in src/PAMI/Message/Event/FAXSessionsEntryEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.php on lines 1..117
src/PAMI/Message/Event/AgentsEvent.php on lines 1..117
src/PAMI/Message/Event/BridgeCreateEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeDestroyEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeListItemEvent.php on lines 1..117
src/PAMI/Message/Event/CallForwardEvent.php on lines 1..117
src/PAMI/Message/Event/DTMFEvent.php on lines 1..117
src/PAMI/Message/Event/HangupEvent.php on lines 1..117
src/PAMI/Message/Event/IdentifyDetailEvent.php on lines 1..138
src/PAMI/Message/Event/LinkEvent.php on lines 1..117
src/PAMI/Message/Event/ListDialplanEvent.php on lines 1..117
src/PAMI/Message/Event/RTCPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPSenderStatEvent.php on lines 1..117
src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.php on lines 1..117
src/PAMI/Message/Event/UnlinkEvent.php on lines 1..117

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when a dtmf is detected in a call.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/DTMFEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.php on lines 1..117
src/PAMI/Message/Event/AgentsEvent.php on lines 1..117
src/PAMI/Message/Event/BridgeCreateEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeDestroyEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeListItemEvent.php on lines 1..117
src/PAMI/Message/Event/CallForwardEvent.php on lines 1..117
src/PAMI/Message/Event/FAXSessionsEntryEvent.php on lines 1..138
src/PAMI/Message/Event/HangupEvent.php on lines 1..117
src/PAMI/Message/Event/IdentifyDetailEvent.php on lines 1..138
src/PAMI/Message/Event/LinkEvent.php on lines 1..117
src/PAMI/Message/Event/ListDialplanEvent.php on lines 1..117
src/PAMI/Message/Event/RTCPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPSenderStatEvent.php on lines 1..117
src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.php on lines 1..117
src/PAMI/Message/Event/UnlinkEvent.php on lines 1..117

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

<?php
/**
 * Event triggered when exchanging rtp stats.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/RTCPReceiverStatEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.php on lines 1..117
src/PAMI/Message/Event/AgentsEvent.php on lines 1..117
src/PAMI/Message/Event/BridgeCreateEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeDestroyEvent.php on lines 1..115
src/PAMI/Message/Event/BridgeListItemEvent.php on lines 1..117
src/PAMI/Message/Event/CallForwardEvent.php on lines 1..117
src/PAMI/Message/Event/DTMFEvent.php on lines 1..117
src/PAMI/Message/Event/FAXSessionsEntryEvent.php on lines 1..138
src/PAMI/Message/Event/HangupEvent.php on lines 1..117
src/PAMI/Message/Event/IdentifyDetailEvent.php on lines 1..138
src/PAMI/Message/Event/LinkEvent.php on lines 1..117
src/PAMI/Message/Event/ListDialplanEvent.php on lines 1..117
src/PAMI/Message/Event/RTPReceiverStatEvent.php on lines 1..117
src/PAMI/Message/Event/RTPSenderStatEvent.php on lines 1..117
src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.php on lines 1..117
src/PAMI/Message/Event/UnlinkEvent.php on lines 1..117

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language