Completed
Push — master ( d56326...5a25e5 )
by Devin
20:04 queued 12s
created

deprecated-functions.php ➔ give_undo_donation_on_refund()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
c 0
b 0
f 0
nc 1
nop 3
dl 0
loc 9
ccs 5
cts 5
cp 1
crap 1
rs 9.6666
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 31 and the first side effect is on line 16.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/**
3
 * Deprecated Functions
4
 *
5
 * All functions that have been deprecated.
6
 *
7
 * @package     Give
8
 * @subpackage  Deprecated
9
 * @copyright   Copyright (c) 2016, WordImpress
10
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
 * @since       1.4.1
12
 */
13
14
// Exit if accessed directly
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
20
/**
21
 * Checks if Guest checkout is enabled for a particular donation form
22
 *
23
 * @since 1.0
24
 * @deprecated 1.4.1
25
 * @global    $give_options
26
 *
27
 * @param int $form_id
28
 *
29
 * @return bool $ret True if guest checkout is enabled, false otherwise
30
 */
31
function give_no_guest_checkout( $form_id ) {
32
33
	$backtrace = debug_backtrace();
34
35
	_give_deprecated_function( __FUNCTION__, '1.4.1', null, $backtrace );
36
37
	$ret = get_post_meta( $form_id, '_give_logged_in_only', true );
38
39
	return (bool) apply_filters( 'give_no_guest_checkout', $ret );
40
}