chan-sccp/PAMI

View on GitHub

Showing 132 of 498 total issues

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

<?php
/**
 * Event triggered when an action ShowDialPlan is issued.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/ListDialplanEvent.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/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
/**
 * Triggered when a hangup is detected.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/HangupEvent.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/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 bridge is created.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/BridgeCreateEvent.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/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
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
/**
 * IdentifyDetail Event
 * isListEntry and Part Action: PJSIPShowEndpoint
 *
Severity: Major
Found in src/PAMI/Message/Event/IdentifyDetailEvent.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/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 linking (connecting) two channels.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/LinkEvent.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/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 bridge is destroyed.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/BridgeDestroyEvent.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/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
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 the 'SCCPCallForward' Event arrives.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/CallForwardEvent.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/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
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/RTPReceiverStatEvent.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/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 an action BridgeList was issued.
 *
Severity: Major
Found in src/PAMI/Message/Event/BridgeListItemEvent.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/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
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 SCCPHintLineStateEntry arrives.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/SCCPHintLineStateEntryEvent.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/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 an agi executes an application.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/AGIExecEvent.php and 16 other locations - About 55 mins to fix
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
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 for agents.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/AgentsEvent.php and 16 other locations - About 55 mins to fix
src/PAMI/Message/Event/AGIExecEvent.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
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