marcelog/PAMI

View on GitHub

Showing 55 of 282 total issues

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

<?php
/**
 * Event triggered when exchanging rtp stats.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/RTCPReceivedEvent.php and 4 other locations - About 4 hrs to fix
src/PAMI/Message/Event/AsyncAGIEndEvent.php on lines 1..175
src/PAMI/Message/Event/BridgeInfoChannelEvent.php on lines 1..175
src/PAMI/Message/Event/MusicOnHoldStopEvent.php on lines 1..175
src/PAMI/Message/Event/RTCPSentEvent.php on lines 1..177

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 182.

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

<?php
/**
 * Event triggered when a channel stops AsyncAGI command processing.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/AsyncAGIEndEvent.php and 4 other locations - About 4 hrs to fix
src/PAMI/Message/Event/BridgeInfoChannelEvent.php on lines 1..175
src/PAMI/Message/Event/MusicOnHoldStopEvent.php on lines 1..175
src/PAMI/Message/Event/RTCPReceivedEvent.php on lines 1..172
src/PAMI/Message/Event/RTCPSentEvent.php on lines 1..177

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 182.

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 4 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a dial is executed.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/DialEvent.php and 3 other locations - About 3 hrs to fix
src/PAMI/Message/Event/NewchannelEvent.php on lines 1..147
src/PAMI/Message/Event/OriginateResponseEvent.php on lines 1..147
src/PAMI/Message/Event/TransferEvent.php on lines 1..147

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 143.

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 4 locations. Consider refactoring.
Open

<?php
/**
 * Response from an async originate.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/OriginateResponseEvent.php and 3 other locations - About 3 hrs to fix
src/PAMI/Message/Event/DialEvent.php on lines 1..147
src/PAMI/Message/Event/NewchannelEvent.php on lines 1..147
src/PAMI/Message/Event/TransferEvent.php on lines 1..147

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 143.

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 4 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a call is transfered.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/TransferEvent.php and 3 other locations - About 3 hrs to fix
src/PAMI/Message/Event/DialEvent.php on lines 1..147
src/PAMI/Message/Event/NewchannelEvent.php on lines 1..147
src/PAMI/Message/Event/OriginateResponseEvent.php on lines 1..147

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 143.

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 4 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a new channel is created.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/NewchannelEvent.php and 3 other locations - About 3 hrs to fix
src/PAMI/Message/Event/DialEvent.php on lines 1..147
src/PAMI/Message/Event/OriginateResponseEvent.php on lines 1..147
src/PAMI/Message/Event/TransferEvent.php on lines 1..147

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 143.

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 3 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when an agent connects.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/AgentConnectEvent.php and 2 other locations - About 2 hrs to fix
src/PAMI/Message/Event/BridgeEvent.php on lines 1..137
src/PAMI/Message/Event/NewstateEvent.php on lines 1..139

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 130.

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 3 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when bridging (connecting) two channels.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/BridgeEvent.php and 2 other locations - About 2 hrs to fix
src/PAMI/Message/Event/AgentConnectEvent.php on lines 1..137
src/PAMI/Message/Event/NewstateEvent.php on lines 1..139

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 130.

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 3 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a channel changes its status.
 *
 * NOTE: For correct callerid values: see: https://issues.asterisk.org/jira/browse/ASTERISK-16910
Severity: Major
Found in src/PAMI/Message/Event/NewstateEvent.php and 2 other locations - About 2 hrs to fix
src/PAMI/Message/Event/AgentConnectEvent.php on lines 1..137
src/PAMI/Message/Event/BridgeEvent.php on lines 1..137

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 130.

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
/**
 * Queue pause action.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Action/QueuePauseAction.php and 1 other location - About 2 hrs to fix
src/PAMI/Message/Action/QueueUnpauseAction.php on lines 1..63

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 121.

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
/**
 * Queue unpause action. This does not exist in the ami.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Action/QueueUnpauseAction.php and 1 other location - About 2 hrs to fix
src/PAMI/Message/Action/QueuePauseAction.php on lines 1..63

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 121.

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 4 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a confbridge is created.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/ConfbridgeStartEvent.php and 3 other locations - About 1 hr to fix
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..125
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 4 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 3 other locations - About 1 hr to fix
src/PAMI/Message/Event/ConfbridgeEndEvent.php on lines 1..125
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..125
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 4 locations. Consider refactoring.
Open

<?php
/**
 * Event triggered when a confbridge is destroyed.
 *
 * PHP Version 5
Severity: Major
Found in src/PAMI/Message/Event/ConfbridgeEndEvent.php and 3 other locations - About 1 hr to fix
src/PAMI/Message/Event/BridgeInfoCompleteEvent.php on lines 1..125
src/PAMI/Message/Event/ConfbridgeStartEvent.php on lines 1..125
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 4 locations. Consider refactoring.
Open

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

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 12 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 11 other locations - About 1 hr 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/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/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 12 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 11 other locations - About 1 hr 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/DTMFEvent.php on lines 1..117
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/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 12 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 11 other locations - About 1 hr 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/DTMFEvent.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/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 12 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 11 other locations - About 1 hr 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/DTMFEvent.php on lines 1..117
src/PAMI/Message/Event/HangupEvent.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 12 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 11 other locations - About 1 hr 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/DTMFEvent.php on lines 1..117
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/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

Severity
Category
Status
Source
Language