Completed
Push — 1.11.x ( 518476...344d9e )
by José
55:02 queued 28:13
created
plugin/buycourses/src/Requests/Utility/CaseInsensitiveDictionary.php 1 patch
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -13,91 +13,91 @@
 block discarded – undo
13 13
  * @subpackage Utilities
14 14
  */
15 15
 class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate {
16
-	/**
17
-	 * Actual item data
18
-	 *
19
-	 * @var array
20
-	 */
21
-	protected $data = array();
16
+    /**
17
+     * Actual item data
18
+     *
19
+     * @var array
20
+     */
21
+    protected $data = array();
22 22
 
23
-	/**
24
-	 * Creates a case insensitive dictionary.
25
-	 *
26
-	 * @param array $data Dictionary/map to convert to case-insensitive
27
-	 */
28
-	public function __construct(array $data = array()) {
29
-		foreach ($data as $key => $value) {
30
-			$this->offsetSet($key, $value);
31
-		}
32
-	}
23
+    /**
24
+     * Creates a case insensitive dictionary.
25
+     *
26
+     * @param array $data Dictionary/map to convert to case-insensitive
27
+     */
28
+    public function __construct(array $data = array()) {
29
+        foreach ($data as $key => $value) {
30
+            $this->offsetSet($key, $value);
31
+        }
32
+    }
33 33
 
34
-	/**
35
-	 * Check if the given item exists
36
-	 *
37
-	 * @param string $key Item key
38
-	 * @return boolean Does the item exist?
39
-	 */
40
-	public function offsetExists($key) {
41
-		$key = strtolower($key);
42
-		return isset($this->data[$key]);
43
-	}
34
+    /**
35
+     * Check if the given item exists
36
+     *
37
+     * @param string $key Item key
38
+     * @return boolean Does the item exist?
39
+     */
40
+    public function offsetExists($key) {
41
+        $key = strtolower($key);
42
+        return isset($this->data[$key]);
43
+    }
44 44
 
45
-	/**
46
-	 * Get the value for the item
47
-	 *
48
-	 * @param string $key Item key
49
-	 * @return string Item value
50
-	 */
51
-	public function offsetGet($key) {
52
-		$key = strtolower($key);
53
-		if (!isset($this->data[$key])) {
54
-			return null;
55
-		}
45
+    /**
46
+     * Get the value for the item
47
+     *
48
+     * @param string $key Item key
49
+     * @return string Item value
50
+     */
51
+    public function offsetGet($key) {
52
+        $key = strtolower($key);
53
+        if (!isset($this->data[$key])) {
54
+            return null;
55
+        }
56 56
 
57
-		return $this->data[$key];
58
-	}
57
+        return $this->data[$key];
58
+    }
59 59
 
60
-	/**
61
-	 * Set the given item
62
-	 *
63
-	 * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
64
-	 *
65
-	 * @param string $key Item name
66
-	 * @param string $value Item value
67
-	 */
68
-	public function offsetSet($key, $value) {
69
-		if ($key === null) {
70
-			throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
71
-		}
60
+    /**
61
+     * Set the given item
62
+     *
63
+     * @throws Requests_Exception On attempting to use dictionary as list (`invalidset`)
64
+     *
65
+     * @param string $key Item name
66
+     * @param string $value Item value
67
+     */
68
+    public function offsetSet($key, $value) {
69
+        if ($key === null) {
70
+            throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
71
+        }
72 72
 
73
-		$key = strtolower($key);
74
-		$this->data[$key] = $value;
75
-	}
73
+        $key = strtolower($key);
74
+        $this->data[$key] = $value;
75
+    }
76 76
 
77
-	/**
78
-	 * Unset the given header
79
-	 *
80
-	 * @param string $key
81
-	 */
82
-	public function offsetUnset($key) {
83
-		unset($this->data[strtolower($key)]);
84
-	}
77
+    /**
78
+     * Unset the given header
79
+     *
80
+     * @param string $key
81
+     */
82
+    public function offsetUnset($key) {
83
+        unset($this->data[strtolower($key)]);
84
+    }
85 85
 
86
-	/**
87
-	 * Get an iterator for the data
88
-	 *
89
-	 * @return ArrayIterator
90
-	 */
91
-	public function getIterator() {
92
-		return new ArrayIterator($this->data);
93
-	}
86
+    /**
87
+     * Get an iterator for the data
88
+     *
89
+     * @return ArrayIterator
90
+     */
91
+    public function getIterator() {
92
+        return new ArrayIterator($this->data);
93
+    }
94 94
 
95
-	/**
96
-	 * Get the headers as an array
97
-	 *
98
-	 * @return array Header data
99
-	 */
100
-	public function getAll() {
101
-		return $this->data;
102
-	}
95
+    /**
96
+     * Get the headers as an array
97
+     *
98
+     * @return array Header data
99
+     */
100
+    public function getAll() {
101
+        return $this->data;
102
+    }
103 103
 }
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Hooker.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
  * @subpackage Utilities
14 14
  */
15 15
 interface Requests_Hooker {
16
-	/**
17
-	 * Register a callback for a hook
18
-	 *
19
-	 * @param string $hook Hook name
20
-	 * @param callback $callback Function/method to call on event
21
-	 * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
22
-	 */
23
-	public function register($hook, $callback, $priority = 0);
16
+    /**
17
+     * Register a callback for a hook
18
+     *
19
+     * @param string $hook Hook name
20
+     * @param callback $callback Function/method to call on event
21
+     * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
22
+     */
23
+    public function register($hook, $callback, $priority = 0);
24 24
 
25
-	/**
26
-	 * Dispatch a message
27
-	 *
28
-	 * @param string $hook Hook name
29
-	 * @param array $parameters Parameters to pass to callbacks
30
-	 * @return boolean Successfulness
31
-	 */
32
-	public function dispatch($hook, $parameters = array());
25
+    /**
26
+     * Dispatch a message
27
+     *
28
+     * @param string $hook Hook name
29
+     * @param array $parameters Parameters to pass to callbacks
30
+     * @return boolean Successfulness
31
+     */
32
+    public function dispatch($hook, $parameters = array());
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/431.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,17 +13,17 @@
 block discarded – undo
13 13
  * @package Requests
14 14
  */
15 15
 class Requests_Exception_HTTP_431 extends Requests_Exception_HTTP {
16
-	/**
17
-	 * HTTP status code
18
-	 *
19
-	 * @var integer
20
-	 */
21
-	protected $code = 431;
16
+    /**
17
+     * HTTP status code
18
+     *
19
+     * @var integer
20
+     */
21
+    protected $code = 431;
22 22
 
23
-	/**
24
-	 * Reason phrase
25
-	 *
26
-	 * @var string
27
-	 */
28
-	protected $reason = 'Request Header Fields Too Large';
23
+    /**
24
+     * Reason phrase
25
+     *
26
+     * @var string
27
+     */
28
+    protected $reason = 'Request Header Fields Too Large';
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/415.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_415 extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer
18
-	 */
19
-	protected $code = 415;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer
18
+     */
19
+    protected $code = 415;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Unsupported Media Type';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Unsupported Media Type';
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/403.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_403 extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer
18
-	 */
19
-	protected $code = 403;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer
18
+     */
19
+    protected $code = 403;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Forbidden';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Forbidden';
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/Unknown.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -11,34 +11,34 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_Unknown extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer|bool Code if available, false if an error occurred
18
-	 */
19
-	protected $code = 0;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer|bool Code if available, false if an error occurred
18
+     */
19
+    protected $code = 0;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Unknown';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Unknown';
27 27
 
28
-	/**
29
-	 * Create a new exception
30
-	 *
31
-	 * If `$data` is an instance of {@see Requests_Response}, uses the status
32
-	 * code from it. Otherwise, sets as 0
33
-	 *
34
-	 * @param string|null $reason Reason phrase
35
-	 * @param mixed $data Associated data
36
-	 */
37
-	public function __construct($reason = null, $data = null) {
38
-		if ($data instanceof Requests_Response) {
39
-			$this->code = $data->status_code;
40
-		}
28
+    /**
29
+     * Create a new exception
30
+     *
31
+     * If `$data` is an instance of {@see Requests_Response}, uses the status
32
+     * code from it. Otherwise, sets as 0
33
+     *
34
+     * @param string|null $reason Reason phrase
35
+     * @param mixed $data Associated data
36
+     */
37
+    public function __construct($reason = null, $data = null) {
38
+        if ($data instanceof Requests_Response) {
39
+            $this->code = $data->status_code;
40
+        }
41 41
 
42
-		parent::__construct($reason, $data);
43
-	}
42
+        parent::__construct($reason, $data);
43
+    }
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/414.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_414 extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer
18
-	 */
19
-	protected $code = 414;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer
18
+     */
19
+    protected $code = 414;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Request-URI Too Large';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Request-URI Too Large';
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/402.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_402 extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer
18
-	 */
19
-	protected $code = 402;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer
18
+     */
19
+    protected $code = 402;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Payment Required';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Payment Required';
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
plugin/buycourses/src/Requests/Exception/HTTP/417.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * @package Requests
12 12
  */
13 13
 class Requests_Exception_HTTP_417 extends Requests_Exception_HTTP {
14
-	/**
15
-	 * HTTP status code
16
-	 *
17
-	 * @var integer
18
-	 */
19
-	protected $code = 417;
14
+    /**
15
+     * HTTP status code
16
+     *
17
+     * @var integer
18
+     */
19
+    protected $code = 417;
20 20
 
21
-	/**
22
-	 * Reason phrase
23
-	 *
24
-	 * @var string
25
-	 */
26
-	protected $reason = 'Expectation Failed';
21
+    /**
22
+     * Reason phrase
23
+     *
24
+     * @var string
25
+     */
26
+    protected $reason = 'Expectation Failed';
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.