Completed
Push — master ( ffbbc3...b6be7c )
by Francesco
02:17
created
src/Auth.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      * @param null   $uri
71 71
      * @param array  $options
72 72
      *
73
-     * @return mixed|\Psr\Http\Message\ResponseInterface
73
+     * @return \Psr\Http\Message\ResponseInterface
74 74
      * @throws \Exception
75 75
      */
76 76
     public function request($method, $uri = null, array $options = [])
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $response = $this->client->request($method, $uri, $options);
86 86
 
87
-        if (!$this->needToRevalidate($response)) {
87
+        if ( ! $this->needToRevalidate($response)) {
88 88
             return $response;
89 89
         }
90 90
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
     public function autenticate($skipCache = false)
110 110
     {
111 111
 
112
-        if ($this->cacheEnabled && !$skipCache) {
113
-            $cacheKey = self::CACHE_NAMESPACE.sha1($this->username.$this->password);
112
+        if ($this->cacheEnabled && ! $skipCache) {
113
+            $cacheKey = self::CACHE_NAMESPACE . sha1($this->username . $this->password);
114 114
             if ($this->cache->contains($cacheKey)) {
115 115
                 return $this->cache->fetch($cacheKey);
116 116
             }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         $contentArray = json_decode($content, true);
131 131
 
132
-        if (!isset($contentArray["response"]["token"])) {
132
+        if ( ! isset($contentArray["response"]["token"])) {
133 133
             throw new AuthException($content);
134 134
         }
135 135
 
Please login to merge, or discard this patch.
src/repository/RepositoryResponse.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-     * @param $jsonEncodedResponse
33
+     * @param \Psr\Http\Message\ResponseInterface $jsonEncodedResponse
34 34
      *
35 35
      * @return RepositoryResponse
36 36
      */
Please login to merge, or discard this patch.
src/repository/SegmentRepository.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     public function add(Segment $segment)
54 54
     {
55 55
 
56
-        $compiledUrl = self::BASE_URL.$segment->getMemberId();
56
+        $compiledUrl = self::BASE_URL . $segment->getMemberId();
57 57
 
58 58
         $payload = [
59 59
             'segment' => [
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $responseContent = json_decode($stream->getContents(), true);
82 82
             $stream->rewind();
83 83
 
84
-            if (!(isset($responseContent['response']['segment']['id']))) {
84
+            if ( ! (isset($responseContent['response']['segment']['id']))) {
85 85
                 throw RepositoryException::wrongFormat(serialize($responseContent));
86 86
             }
87 87
 
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
     public function findOneById($id, $memberId)
102 102
     {
103 103
 
104
-        $compiledUrl = self::BASE_URL.$memberId.'/'.$id;
104
+        $compiledUrl = self::BASE_URL . $memberId . '/' . $id;
105 105
 
106 106
         $response = $this->client->request('GET', $compiledUrl);
107 107
 
108 108
         $repositoryResponse = RepositoryResponse::fromResponse($response);
109 109
 
110
-        if (!$repositoryResponse->isSuccessful()) {
110
+        if ( ! $repositoryResponse->isSuccessful()) {
111 111
             return null;
112 112
         }
113 113
 
@@ -136,21 +136,21 @@  discard block
 block discarded – undo
136 136
     public function findAll($memberId, $start = 0, $maxResults = 100)
137 137
     {
138 138
 
139
-        if ($this->isCacheEnabled()){
140
-            $cacheKey = self::CACHE_NAMESPACE.sha1($memberId.$start.$maxResults);
139
+        if ($this->isCacheEnabled()) {
140
+            $cacheKey = self::CACHE_NAMESPACE . sha1($memberId . $start . $maxResults);
141 141
             if ($this->cache->contains($cacheKey)) {
142 142
                 return $this->cache->fetch($cacheKey);
143 143
             }
144 144
 
145 145
         }
146 146
 
147
-        $compiledUrl = self::BASE_URL.$memberId."?start_element=$start&num_elements=$maxResults";
147
+        $compiledUrl = self::BASE_URL . $memberId . "?start_element=$start&num_elements=$maxResults";
148 148
 
149 149
         $response = $this->client->request('GET', $compiledUrl);
150 150
 
151 151
         $repositoryResponse = RepositoryResponse::fromResponse($response);
152 152
 
153
-        if (!$repositoryResponse->isSuccessful()) {
153
+        if ( ! $repositoryResponse->isSuccessful()) {
154 154
             return null;
155 155
         }
156 156
 
Please login to merge, or discard this patch.
src/exceptions/AuthException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public static function authFailed($reason)
17 17
     {
18
-        return new self(self::DEFAULT_MESSAGE.$reason, 0, null);
18
+        return new self(self::DEFAULT_MESSAGE . $reason, 0, null);
19 19
     }
20 20
 
21 21
 }
Please login to merge, or discard this patch.
phpunit_bs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 umask(0000);
4 4
 
5
-if(function_exists('xdebug_disable')) {
5
+if (function_exists('xdebug_disable')) {
6 6
     xdebug_disable();
7 7
 }
8 8
 
9
-include(__DIR__.'/vendor/autoload.php');
10 9
\ No newline at end of file
10
+include(__DIR__ . '/vendor/autoload.php');
11 11
\ No newline at end of file
Please login to merge, or discard this patch.