Passed
Push — develop ( 54c444...49162c )
by Oguzhan
02:28
created
src/MusicBrainz/HttpAdapters/GuzzleHttpAdapter.php 1 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.
examples/browse.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@  discard block
 block discarded – undo
24 24
 try {
25 25
     $releaseGroups = $brainz->search(new ReleaseGroupFilter($args));
26 26
     var_dump($releaseGroups);
27
-} catch (Exception $e) {
27
+}
28
+catch (Exception $e) {
28 29
     print $e->getMessage();
29 30
 }
30 31
 print "\n\n";
@@ -41,7 +42,8 @@  discard block
 block discarded – undo
41 42
 try {
42 43
     $artists = $brainz->search(new ArtistFilter($args));
43 44
     print_r($artists);
44
-} catch (Exception $e) {
45
+}
46
+catch (Exception $e) {
45 47
     print $e->getMessage();
46 48
 }
47 49
 print "\n\n";
@@ -59,7 +61,8 @@  discard block
 block discarded – undo
59 61
 try {
60 62
     $recordings = $brainz->search(new RecordingFilter($args));
61 63
     print_r($recordings);
62
-} catch (Exception $e) {
64
+}
65
+catch (Exception $e) {
63 66
     print $e->getMessage();
64 67
 }
65 68
 print "\n\n";
@@ -75,6 +78,7 @@  discard block
 block discarded – undo
75 78
 try {
76 79
     $labels = $brainz->search(new LabelFilter($args));
77 80
     print_r($labels);
78
-} catch (Exception $e) {
81
+}
82
+catch (Exception $e) {
79 83
     print $e->getMessage();
80 84
 }
Please login to merge, or discard this patch.