Passed
Push — master ( af7932...3b245e )
by Oguzhan
50s
created
examples/first-recording-search.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,7 @@
 block discarded – undo
67 67
     }
68 68
 
69 69
     var_dump(array($firstRecording));
70
-} catch (Exception $e) {
70
+}
71
+catch (Exception $e) {
71 72
     print ($e->getMessage());
72 73
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@  discard block
 block discarded – undo
13 13
 
14 14
 // set defaults
15 15
 $releaseDate    = new DateTime();
16
-$artistId       = null;
17
-$songId         = null;
16
+$artistId       = NULL;
17
+$songId         = NULL;
18 18
 $trackLen       = -1;
19 19
 $albumName      = '';
20
-$lastScore      = null;
20
+$lastScore      = NULL;
21 21
 $firstRecording = array(
22
-    'release'     => null,
22
+    'release'     => NULL,
23 23
     'releaseDate' => new DateTime(),
24
-    'recording'   => null,
25
-    'artistId'    => null,
26
-    'recordingId' => null,
27
-    'trackLength' => null
24
+    'recording'   => NULL,
25
+    'artistId'    => NULL,
26
+    'recordingId' => NULL,
27
+    'trackLength' => NULL
28 28
 );
29 29
 
30 30
 // Set the search arguments to pass into the RecordingFilter
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         // if the recording has a lower score than the previous recording, stop the loop.
45 45
         // This is because scores less than 100 usually don't match the search well
46
-        if (null != $lastScore && $recording->getScore() < $lastScore) {
46
+        if (NULL != $lastScore && $recording->getScore() < $lastScore) {
47 47
             break;
48 48
         }
49 49
 
Please login to merge, or discard this patch.
examples/search.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.
examples/lookup.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@  discard block
 block discarded – undo
24 24
 try {
25 25
     $artist = $brainz->lookup('artist', '4dbf5678-7a31-406a-abbe-232f8ac2cd63', $includes);
26 26
     print_r($artist);
27
-} catch (Exception $e) {
27
+}
28
+catch (Exception $e) {
28 29
     print $e->getMessage();
29 30
 }
30 31
 print "\n\n";
@@ -38,6 +39,7 @@  discard block
 block discarded – undo
38 39
     //born this way: the remix
39 40
     $releaseGroup = $brainz->lookup('release-group', 'e4307c5f-1959-4163-b4b1-ded4f9d786b0');
40 41
     print_r($releaseGroup);
41
-} catch (Exception $e) {
42
+}
43
+catch (Exception $e) {
42 44
     echo $e->getMessage();
43 45
 }
Please login to merge, or discard this patch.
src/MusicBrainz/HttpAdapters/GuzzleFiveAdapter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $this->client = $client;
23 23
 
24
-        if(filter_var($endpoint, FILTER_VALIDATE_URL)) {
24
+        if (filter_var($endpoint, FILTER_VALIDATE_URL)) {
25 25
             $this->endpoint = $endpoint;
26 26
         }
27 27
     }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
42 42
     {
43
-        if($options['user-agent'] == '') {
43
+        if ($options['user-agent'] == '') {
44 44
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
45 45
         }
46 46
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param ClientInterface $client
18 18
      * @param null $endpoint
19 19
      */
20
-    public function __client(ClientInterface $client, $endpoint = null)
20
+    public function __client(ClientInterface $client, $endpoint = NULL)
21 21
     {
22 22
         $this->client = $client;
23 23
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @throws Exception
39 39
      * @return array
40 40
      */
41
-    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = false, $returnArray = false)
41
+    public function call($path, array $params = array(), array $options = array(), $isAuthRequired = FALSE, $returnArray = FALSE)
42 42
     {
43 43
         if($options['user-agent'] == '') {
44 44
             throw new Exception('You must set a valid User Agent before accessing the MusicBrainz API');
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         ];
53 53
 
54 54
         if ($isAuthRequired) {
55
-            if ($options['user'] != null && $options['password'] != null) {
55
+            if ($options['user'] != NULL && $options['password'] != NULL) {
56 56
                 $requestOptions['auth'] = [
57 57
                     'username' => $options['user'],
58 58
                     'password' => $options['password'],
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.