Test Setup Failed
Pull Request — master (#1)
by Oguzhan
03:03
created
examples/browse.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@  discard block
 block discarded – undo
19 19
 try {
20 20
     $details = $brainz->browseRelease('artist', '6fe07aa5-fec0-4eca-a456-f29bff451b04', $includes, 2);
21 21
     print_r($details);
22
-} catch (Exception $e) {
22
+}
23
+catch (Exception $e) {
23 24
     print $e->getMessage();
24 25
 }
25 26
 print "\n\n";
@@ -32,7 +33,8 @@  discard block
 block discarded – undo
32 33
 try {
33 34
     $details = $brainz->browseArtist('recording', 'd615590b-1546-441d-9703-b3cf88487cbd', $includes);
34 35
     print_r($details);
35
-} catch (Exception $e) {
36
+}
37
+catch (Exception $e) {
36 38
     print $e->getMessage();
37 39
 }
38 40
 print "\n\n";
@@ -45,7 +47,8 @@  discard block
 block discarded – undo
45 47
 try {
46 48
     $details = $brainz->browseLabel('artist', '6fe07aa5-fec0-4eca-a456-f29bff451b04', $includes);
47 49
     print_r($details);
48
-} catch (Exception $e) {
50
+}
51
+catch (Exception $e) {
49 52
     print $e->getMessage();
50 53
 }
51 54
 print "\n\n";
@@ -58,6 +61,7 @@  discard block
 block discarded – undo
58 61
 try {
59 62
     $details = $brainz->browseLabel('release', 'b072b162-a733-3137-a4a0-4375172d98c9', $includes);
60 63
     print_r($details);
61
-} catch (Exception $e) {
64
+}
65
+catch (Exception $e) {
62 66
     print $e->getMessage();
63 67
 }
Please login to merge, or discard this patch.
examples/first-recording-search.php 1 patch
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.
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/Artist.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @throws Exception
61 61
      */
62
-    public function __construct(array $artist, MusicBrainz $brainz)
63
-    {
62
+    public function __construct(array $artist, MusicBrainz $brainz) {
64 63
         if (!isset($artist['id']) || isset($artist['id']) && !$brainz->isValidMBID($artist['id'])) {
65 64
             throw new Exception('Can not create artist object. Missing valid MBID');
66 65
         }
@@ -81,32 +80,28 @@  discard block
 block discarded – undo
81 80
     /**
82 81
      * @return mixed
83 82
      */
84
-    public function getName()
85
-    {
83
+    public function getName() {
86 84
         return $this->name;
87 85
     }
88 86
 
89 87
     /**
90 88
      * @return int
91 89
      */
92
-    public function getScore()
93
-    {
90
+    public function getScore() {
94 91
         return isset($this->data['score']) ? (int)$this->data['score'] : 0;
95 92
     }
96 93
 
97 94
     /**
98 95
      * @return string
99 96
      */
100
-    public function getType()
101
-    {
97
+    public function getType() {
102 98
         return $this->type;
103 99
     }
104 100
 
105 101
     /**
106 102
      * @return array
107 103
      */
108
-    public function getReleases()
109
-    {
104
+    public function getReleases() {
110 105
         if (null === $this->releases) {
111 106
             $this->releases = $this->brainz->browseRelease('artist', $this->getId());
112 107
         }
@@ -117,8 +112,7 @@  discard block
 block discarded – undo
117 112
     /**
118 113
      * @return string
119 114
      */
120
-    public function getId()
121
-    {
115
+    public function getId() {
122 116
         return $this->id;
123 117
     }
124 118
 }
Please login to merge, or discard this patch.
src/MusicBrainz/Country.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
      * @throws \OutOfBoundsException
26 26
      * @return bool
27 27
      */
28
-    public static function getName($countryCode)
29
-    {
28
+    public static function getName($countryCode) {
30 29
         if (!isset(self::$countries[$countryCode])) {
31 30
             throw new \OutOfBoundsException(
32 31
                 sprintf(
Please login to merge, or discard this patch.
src/MusicBrainz/Label.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
      * @param array       $label
42 42
      * @param MusicBrainz $brainz
43 43
      */
44
-    public function __construct(array $label, MusicBrainz $brainz)
45
-    {
44
+    public function __construct(array $label, MusicBrainz $brainz) {
46 45
         $this->data   = $label;
47 46
         $this->brainz = $brainz;
48 47
 
Please login to merge, or discard this patch.
src/MusicBrainz/ReleaseGroup.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param array       $releaseGroup
30 30
      * @param MusicBrainz $brainz
31 31
      */
32
-    public function __construct(array $releaseGroup, MusicBrainz $brainz)
33
-    {
32
+    public function __construct(array $releaseGroup, MusicBrainz $brainz) {
34 33
         $this->data   = $releaseGroup;
35 34
         $this->brainz = $brainz;
36 35
 
@@ -40,32 +39,28 @@  discard block
 block discarded – undo
40 39
     /**
41 40
      * @return string
42 41
      */
43
-    public function getId()
44
-    {
42
+    public function getId() {
45 43
         return $this->id;
46 44
     }
47 45
 
48 46
     /**
49 47
      * @return string
50 48
      */
51
-    public function getTitle()
52
-    {
49
+    public function getTitle() {
53 50
         return $this->data['title'];
54 51
     }
55 52
 
56 53
     /**
57 54
      * @return mixed
58 55
      */
59
-    public function getScore()
60
-    {
56
+    public function getScore() {
61 57
         return $this->data['score'];
62 58
     }
63 59
 
64 60
     /**
65 61
      * @return Release[]
66 62
      */
67
-    public function getReleases()
68
-    {
63
+    public function getReleases() {
69 64
         if (!empty($this->releases)) {
70 65
             return $this->releases;
71 66
         }
Please login to merge, or discard this patch.
src/MusicBrainz/Collection.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       $collection
26 26
      * @param MusicBrainz $brainz
27 27
      */
28
-    public function __construct(array $collection, MusicBrainz $brainz)
29
-    {
28
+    public function __construct(array $collection, MusicBrainz $brainz) {
30 29
         $this->data   = $collection;
31 30
         $this->brainz = $brainz;
32 31
 
Please login to merge, or discard this patch.