Failed Conditions
Push — develop ( 6a6fbf...2eb996 )
by Remco
19:08
created

src/SofortClient.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\TargetPay;
4
5
use Pronamic\WordPress\Pay\Core\Util;
6
7
/**
8
 * Title: TargetPay SOFORT Banking client
9
 * Description:
10
 * Copyright: 2005-2020 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author  Remco Tolsma
14
 * @version 2.0.0
15
 * @since   1.0.0
16
 */
17
class SofortClient {
18
	/**
19
	 * URL to start an transaction
20
	 *
21
	 * @var string
22
	 */
23
	const URL_START_TRANSACTION = 'https://www.targetpay.com/directebanking/start';
24
25
	/**
26
	 * Constructs and initializes an TargetPay SOFORT Banking client object
27
	 */
28
	public function __construct() {
29
30
	}
31
32
	/**
33
	 * Remote get.
34
	 *
35
	 * @param string $url Request URL.
36
	 */
37
	private static function remote_get( $url ) {
38
	}
39
40
	/**
41
	 * Start transaction
42
	 *
43
	 * @param SofortStartParameters $parameters Sofort start parameters.
44
	 */
45
	public function start_transaction( SofortStartParameters $parameters ) {
46
		$url = Util::build_url( self::URL_START_TRANSACTION, (array) $parameters );
47
48
		$data = self::remote_get( $url );
0 ignored issues
show
Are you sure the assignment to $data is correct as self::remote_get($url) targeting Pronamic\WordPress\Pay\G...ortClient::remote_get() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
49
50
		// @todo need work
51
	}
52
}
53