Completed
Branch master (a3a5b0)
by Jeroen
02:56
created
src/Api.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * @param  string $apiKey
34 34
      * @param  string $format
35 35
      * @param  string $endpoint
36
-     * @return void
36
+     * @return Api
37 37
      */
38 38
     public function __construct($apiKey, $format = 'rest', $endpoint = 'https://api.flickr.com/services/rest/')
39 39
     {
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param  string $endpoint
36 36
      * @return void
37 37
      */
38
-    public function __construct($apiKey, $format = 'rest', $endpoint = 'https://api.flickr.com/services/rest/')
39
-    {
38
+    public function __construct($apiKey, $format = 'rest', $endpoint = 'https://api.flickr.com/services/rest/') {
40 39
         $this->key = $apiKey;
41 40
         $this->format = $format;
42 41
 
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
      * @param  array|null               $parameters
54 53
      * @return \JeroenG\Flickr\Response
55 54
      */
56
-    public function request($call, $parameters = null)
57
-    {
55
+    public function request($call, $parameters = null) {
58 56
         $guzzleResponse = $this->client->get($this->api().'&method='.$call.$this->parameters($parameters));
59 57
 
60 58
         if ($guzzleResponse->getStatusCode() == 200) {
@@ -69,8 +67,7 @@  discard block
 block discarded – undo
69 67
      * 
70 68
      * @return string
71 69
      */
72
-    protected function api()
73
-    {
70
+    protected function api() {
74 71
         return '?api_key='.$this->key.'&format='.$this->format;
75 72
     }
76 73
 
@@ -80,8 +77,7 @@  discard block
 block discarded – undo
80 77
      * @param  array  $array
81 78
      * @return string
82 79
      */
83
-    protected function parameters($array)
84
-    {
80
+    protected function parameters($array) {
85 81
         if ( ! is_array($array)) {
86 82
             return;
87 83
         }
Please login to merge, or discard this patch.
src/FlickrServiceProvider.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     /**
32 32
      * Get the services provided by the provider.
33 33
      *
34
-     * @return array
34
+     * @return string[]
35 35
      */
36 36
     public function provides()
37 37
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function register()
21 21
     {
22
-        $this->app->singleton('flickr', function ($app) {
22
+        $this->app->singleton('flickr', function($app) {
23 23
 
24 24
             $api = new Api(env('FLICKR_KEY'), 'php_serial');
25 25
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,16 +9,14 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Perform post-registration booting of services.
11 11
      */
12
-    public function boot()
13
-    {
12
+    public function boot() {
14 13
         //
15 14
     }
16 15
 
17 16
     /**
18 17
      * Register any package services.
19 18
      */
20
-    public function register()
21
-    {
19
+    public function register() {
22 20
         $this->app->singleton('flickr', function ($app) {
23 21
 
24 22
             $api = new Api(env('FLICKR_KEY'), 'php_serial');
@@ -33,8 +31,7 @@  discard block
 block discarded – undo
33 31
      *
34 32
      * @return array
35 33
      */
36
-    public function provides()
37
-    {
34
+    public function provides() {
38 35
         return ['flickr'];
39 36
     }
40 37
 }
Please login to merge, or discard this patch.
src/Flickr.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
      * 
17 17
      * @param \JeroenG\Flickr\Api $api
18 18
      */
19
-    public function __construct(Api $api)
20
-    {
19
+    public function __construct(Api $api) {
21 20
         $this->api = $api;
22 21
     }
23 22
 
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
      * @param  array|null               $parameters
29 28
      * @return \JeroenG\Flickr\Response
30 29
      */
31
-    public function request($method, $parameters = null)
32
-    {
30
+    public function request($method, $parameters = null) {
33 31
         return $this->api->request($method, $parameters);
34 32
     }
35 33
 
@@ -39,8 +37,7 @@  discard block
 block discarded – undo
39 37
      * @param  string                   $string
40 38
      * @return \JeroenG\Flickr\Response
41 39
      */
42
-    public function echoThis($string)
43
-    {
40
+    public function echoThis($string) {
44 41
         return $this->request('flickr.test.echo', ['this' => $string]);
45 42
     }
46 43
 
@@ -50,8 +47,7 @@  discard block
 block discarded – undo
50 47
      * @param  array|null               $parameters
51 48
      * @return \JeroenG\Flickr\Response
52 49
      */
53
-    public function listSets($parameters = null)
54
-    {
50
+    public function listSets($parameters = null) {
55 51
         return $this->request('flickr.photosets.getList', $parameters);
56 52
     }
57 53
 
@@ -63,8 +59,7 @@  discard block
 block discarded – undo
63 59
      * @param  array|null               $otherParameters
64 60
      * @return \JeroenG\Flickr\Response
65 61
      */
66
-    public function photosForSet($setId, $userId, $otherParameters = null)
67
-    {
62
+    public function photosForSet($setId, $userId, $otherParameters = null) {
68 63
         $parameters['photoset_id'] = $setId;
69 64
         $parameters['user_id'] = $userId;
70 65
 
@@ -82,8 +77,7 @@  discard block
 block discarded – undo
82 77
      * @param  string|null              $secretId
83 78
      * @return \JeroenG\Flickr\Response
84 79
      */
85
-    public function photoInfo($photoId, $secretId = null)
86
-    {
80
+    public function photoInfo($photoId, $secretId = null) {
87 81
         $parameters['photo_id'] = $photoId;
88 82
 
89 83
         if ( ! is_null($secretId)) {
Please login to merge, or discard this patch.
src/FlickrLaravelFacade.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
      *
12 12
      * @return string
13 13
      */
14
-    protected static function getFacadeAccessor()
15
-    {
14
+    protected static function getFacadeAccessor() {
16 15
         return 'flickr';
17 16
     }
18 17
 }
Please login to merge, or discard this patch.
src/Response.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
      * 
19 19
      * @param \Psr\Http\Message\ResponseInterface $guzzleResponse
20 20
      */
21
-    public function __construct(ResponseInterface $guzzleResponse)
22
-    {
21
+    public function __construct(ResponseInterface $guzzleResponse) {
23 22
         $this->contents = unserialize($guzzleResponse->getBody()->getContents());
24 23
     }
25 24
 
@@ -28,8 +27,7 @@  discard block
 block discarded – undo
28 27
      * 
29 28
      * @return string
30 29
      */
31
-    public function getStatus()
32
-    {
30
+    public function getStatus() {
33 31
         return $this->contents['stat'];
34 32
     }
35 33
 
@@ -39,8 +37,7 @@  discard block
 block discarded – undo
39 37
      * @param  string $method
40 38
      * @return string
41 39
      */
42
-    public function getContent($method)
43
-    {
40
+    public function getContent($method) {
44 41
         return $this->contents[$method]['_content'];
45 42
     }
46 43
 
@@ -50,8 +47,7 @@  discard block
 block discarded – undo
50 47
      * @param  string $variable
51 48
      * @return mixed
52 49
      */
53
-    public function __get($variable)
54
-    {
50
+    public function __get($variable) {
55 51
         return $this->contents[$variable];
56 52
     }
57 53
 }
Please login to merge, or discard this patch.