Test Setup Failed
Pull Request — master (#1)
by Oguzhan
03:03
created
src/MusicBrainz/HttpAdapters/AbstractHttpAdapter.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,5 +23,5 @@
 block discarded – undo
23 23
      *
24 24
      * @return array
25 25
      */
26
-    abstract public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false);
26
+    abstract public function call($path, array $params = array(), array $options = array(), $isAuthRequired = FALSE, $returnArray = FALSE);
27 27
 }
Please login to merge, or discard this patch.
src/MusicBrainz/HttpAdapters/RequestsHttpAdapter.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param null $endpoint Override the default endpoint (useful for local development)
18 18
      */
19
-    public function __construct($endpoint = null)
20
-    {
19
+    public function __construct($endpoint = null) {
21 20
         if (filter_var($endpoint, FILTER_VALIDATE_URL)) {
22 21
             $this->endpoint = $endpoint;
23 22
         }
@@ -35,8 +34,7 @@  discard block
 block discarded – undo
35 34
      * @throws \MusicBrainz\Exception
36 35
      * @return array
37 36
      */
38
-    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
39
-    {
37
+    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) {
40 38
         if ($options['user-agent'] == '') {
41 39
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
42 40
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param null $endpoint Override the default endpoint (useful for local development)
18 18
      */
19
-    public function __construct($endpoint = null)
19
+    public function __construct($endpoint = NULL)
20 20
     {
21 21
         if (filter_var($endpoint, FILTER_VALIDATE_URL)) {
22 22
             $this->endpoint = $endpoint;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @throws \MusicBrainz\Exception
36 36
      * @return array
37 37
      */
38
-    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
38
+    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = FALSE, $returnArray = FALSE)
39 39
     {
40 40
         if ($options['user-agent'] == '') {
41 41
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $requestOptions = array();
57 57
         if ($isAuthRequired) {
58
-            if ($options['user'] != null && $options['password'] != null) {
58
+            if ($options['user'] != NULL && $options['password'] != NULL) {
59 59
                 $requestOptions['auth'] = array($options['user'], $options['password']);
60 60
             } else {
61 61
                 throw new Exception('Authentication is required');
Please login to merge, or discard this patch.
src/MusicBrainz/HttpAdapters/GuzzleHttpAdapter.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param \Guzzle\Http\ClientInterface $client The Guzzle client used to make requests
24 24
      * @param null                         $endpoint Override the default endpoint (useful for local development)
25 25
      */
26
-    public function __construct(ClientInterface $client, $endpoint = null)
27
-    {
26
+    public function __construct(ClientInterface $client, $endpoint = null) {
28 27
         $this->client = $client;
29 28
 
30 29
         if (filter_var($endpoint, FILTER_VALIDATE_URL)) {
@@ -44,8 +43,7 @@  discard block
 block discarded – undo
44 43
      * @throws \MusicBrainz\Exception
45 44
      * @return array
46 45
      */
47
-    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
48
-    {
46
+    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false) {
49 47
         if ($options['user-agent'] == '') {
50 48
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
51 49
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param \Guzzle\Http\ClientInterface $client The Guzzle client used to make requests
24 24
      * @param null                         $endpoint Override the default endpoint (useful for local development)
25 25
      */
26
-    public function __construct(ClientInterface $client, $endpoint = null)
26
+    public function __construct(ClientInterface $client, $endpoint = NULL)
27 27
     {
28 28
         $this->client = $client;
29 29
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @throws \MusicBrainz\Exception
45 45
      * @return array
46 46
      */
47
-    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
47
+    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = FALSE, $returnArray = FALSE)
48 48
     {
49 49
         if ($options['user-agent'] == '') {
50 50
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
         $request->setHeader('User-Agent', $options['user-agent']);
63 63
 
64 64
         if ($isAuthRequired) {
65
-            if ($options['user'] != null && $options['password'] != null) {
65
+            if ($options['user'] != NULL && $options['password'] != NULL) {
66 66
                 $request->setAuth($options['user'], $options['password'], CURLAUTH_DIGEST);
67 67
             } else {
68 68
                 throw new Exception('Authentication is required');
69 69
             }
70 70
         }
71 71
 
72
-        $request->getQuery()->useUrlEncoding(false);
72
+        $request->getQuery()->useUrlEncoding(FALSE);
73 73
 
74 74
         // musicbrainz throttle
75 75
         sleep(1);
Please login to merge, or discard this patch.
src/MusicBrainz/Tag.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
      * @param array       $tag
26 26
      * @param MusicBrainz $brainz
27 27
      */
28
-    public function __construct(array $tag, MusicBrainz $brainz)
29
-    {
28
+    public function __construct(array $tag, MusicBrainz $brainz) {
30 29
         $this->data   = $tag;
31 30
         $this->brainz = $brainz;
32 31
 
Please login to merge, or discard this patch.