Completed
Push — master ( 1e061c...bc1ecf )
by Vladimir
05:31
created
src/PulseColumn.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -69,6 +69,9 @@
 block discarded – undo
69 69
         $this->deletedObject = true;
70 70
     }
71 71
 
72
+    /**
73
+     * @param string $field
74
+     */
72 75
     private function editField ($field, $value)
73 76
     {
74 77
         $this->checkInvalid();
Please login to merge, or discard this patch.
src/Utilities/UrlQuery.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
      *
234 234
      * @throws \allejo\DaPulse\Exceptions\CurlException If cURL is misconfigured or encounters an error
235 235
      *
236
-     * @return mixed
236
+     * @return string
237 237
      */
238 238
     private function executeCurl ()
239 239
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function __construct ($url, $urlParams)
56 56
     {
57
-        $this->url  = $url . "?" . self::formatParameters($urlParams);
57
+        $this->url  = $url."?".self::formatParameters($urlParams);
58 58
         $this->cURL = curl_init();
59 59
 
60 60
         $this->configureCurl();
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         curl_setopt_array($this->cURL, [
89 89
             CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
90
-            CURLOPT_USERPWD  => $username . ":" . $password
90
+            CURLOPT_USERPWD  => $username.":".$password
91 91
         ]);
92 92
     }
93 93
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                 continue;
312 312
             }
313 313
 
314
-            $parameters[] = rawurlencode($key) . "=" . rawurlencode($value);
314
+            $parameters[] = rawurlencode($key)."=".rawurlencode($value);
315 315
         }
316 316
 
317 317
         return implode("&", $parameters);
Please login to merge, or discard this patch.
tests/sanitize-fixtures.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$auth = json_decode(file_get_contents(__DIR__ . '/../phpunit-auth.json'), true);
4
-$findAndReplace = json_decode(file_get_contents(__DIR__ . '/sanitize-values.json'), true);
5
-$fixtures = file_get_contents(__DIR__ . '/fixtures/PhpPulseVCR');
3
+$auth = json_decode(file_get_contents(__DIR__.'/../phpunit-auth.json'), true);
4
+$findAndReplace = json_decode(file_get_contents(__DIR__.'/sanitize-values.json'), true);
5
+$fixtures = file_get_contents(__DIR__.'/fixtures/PhpPulseVCR');
6 6
 
7 7
 $sanitized = str_replace($auth['apiToken'], 'YourApiKeyHere', $fixtures);
8 8
 
@@ -11,4 +11,4 @@  discard block
 block discarded – undo
11 11
     $sanitized = str_replace($key, $value, $sanitized);
12 12
 }
13 13
 
14
-file_put_contents(__DIR__ . '/fixtures/PhpPulseVCR-sanitized', $sanitized);
15 14
\ No newline at end of file
15
+file_put_contents(__DIR__.'/fixtures/PhpPulseVCR-sanitized', $sanitized);
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
src/PulseGroup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
 
51 51
     public function isArchived ()
52 52
     {
53
-        return (bool)$this->archived;
53
+        return (bool) $this->archived;
54 54
     }
55 55
 
56 56
     public function isDeleted ()
57 57
     {
58
-        return (bool)$this->deleted;
58
+        return (bool) $this->deleted;
59 59
     }
60 60
 
61 61
     /**
Please login to merge, or discard this patch.
src/PulseNote.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *
107 107
      * @since  0.1.0
108 108
      *
109
-     * @return string
109
+     * @return integer
110 110
      */
111 111
     public function getId ()
112 112
     {
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      *
213 213
      * @param  null|string        $title        The new title of the note
214 214
      * @param  null|string        $content      The new content of the note
215
-     * @param  null|int|PulseUser $user         The new author of the note
215
+     * @param  string $user         The new author of the note
216 216
      * @param  null|bool          $createUpdate Whether to create an update or not
217 217
      *
218 218
      * @since  0.1.0
Please login to merge, or discard this patch.
src/Objects/ApiObject.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 
125 125
         if ($this->arrayConstructionOnly && !is_array($idOrArray))
126 126
         {
127
-            throw new \InvalidArgumentException("A $staticClass cannot be fetched from an ID.");
127
+            throw new \InvalidArgumentException("a $staticClass cannot be fetched from an ID.");
128 128
         }
129 129
 
130 130
         $this->initializeValues();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     {
304 304
         if (self::lazyCastNeeded($target, $objectType))
305 305
         {
306
-            $object = ($objectType[0] == "\\") ? $objectType : self::OBJ_NAMESPACE . $objectType;
306
+            $object = ($objectType[0] == "\\") ? $objectType : self::OBJ_NAMESPACE.$objectType;
307 307
             $target = new $object($target);
308 308
         }
309 309
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     final protected static function lazyCastNeeded ($target, $objectType)
344 344
     {
345
-        $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE . $objectType;
345
+        $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE.$objectType;
346 346
 
347 347
         return !($target instanceof $objectDefinition);
348 348
     }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
      */
381 381
     final protected static function castArrayToObjectArray ($className, $objects, $lazyLoad = false)
382 382
     {
383
-        $class = self::OBJ_NAMESPACE . $className;
383
+        $class = self::OBJ_NAMESPACE.$className;
384 384
         $array = [];
385 385
 
386 386
         foreach ($objects as $post)
Please login to merge, or discard this patch.
src/PulseUpdate.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      *
136 136
      * @since  0.1.0
137 137
      *
138
-     * @return string
138
+     * @return integer
139 139
      */
140 140
     public function getId ()
141 141
     {
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      *
324 324
      * @since  0.3.0 Previously was available as 'getHasAssets()'
325 325
      *
326
-     * @return bool
326
+     * @return string
327 327
      */
328 328
     public function hasAssets ()
329 329
     {
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
      * @api
478 478
      *
479 479
      * @param  int|PulseUser $user          The author of this post
480
-     * @param  int|Pulse     $pulse         The Pulse to whom this update will belong to
480
+     * @param  integer     $pulse         The Pulse to whom this update will belong to
481 481
      * @param  string        $text          The content of the update
482 482
      * @param  null|bool     $announceToAll Whether or not to announce this update to everyone's wall
483 483
      *
Please login to merge, or discard this patch.
src/Objects/PulseColumnTextValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         $url        = sprintf("%s/%d/columns/%s/text.json", self::apiEndpoint(), $this->board_id, $this->column_id);
52 52
         $postParams = [
53 53
             "pulse_id" => $this->pulse_id,
54
-            "text"     => (string)$text
54
+            "text"     => (string) $text
55 55
         ];
56 56
 
57 57
         $result = self::sendPut($url, $postParams);
Please login to merge, or discard this patch.
docs/sami-config.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
  * Include this section if you want sami to document
33 33
  * private and protected functions/properties
34 34
  */
35
-$sami['filter'] = function () {
35
+$sami['filter'] = function ()
36
+{
36 37
     return new ApiFilter();
37 38
 };
38 39
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__ . '/ApiFilter.php';
3
+require_once __DIR__.'/ApiFilter.php';
4 4
 
5 5
 use allejo\Sami\ApiFilter;
6 6
 use Sami\RemoteRepository\GitHubRemoteRepository;
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 $iterator = Finder::create()
12 12
     ->files()
13 13
     ->name('*.php')
14
-    ->in($dir = __DIR__ . '/../src')
14
+    ->in($dir = __DIR__.'/../src')
15 15
 ;
16 16
 
17 17
 // generate documentation for all 0.* branches and the master branch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 $sami = new Sami($iterator, array(
25 25
     'versions'             => $versions,
26 26
     'title'                => 'PhpPulse API',
27
-    'build_dir'            => __DIR__ . '/api/build/PhpPulse/%version%',
28
-    'cache_dir'            => __DIR__ . '/api/cache/PhpPulse/%version%',
27
+    'build_dir'            => __DIR__.'/api/build/PhpPulse/%version%',
28
+    'cache_dir'            => __DIR__.'/api/cache/PhpPulse/%version%',
29 29
     'remote_repository'    => new GitHubRemoteRepository('allejo/PhpPulse', dirname($dir)),
30 30
     'default_opened_level' => 2,
31 31
 ));
Please login to merge, or discard this patch.