Completed
Pull Request — develop (#15)
by Ben
02:27
created
src/Api.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
     }
81 81
 
82 82
     /**
83
-     * @param $name
84
-     * @param $api
83
+     * @param string $name
84
+     * @param Repo $api
85 85
      * @return ApiInterface
86 86
      */
87 87
     private function getApiFrom($name, $api)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     }
164 164
 
165 165
     /**
166
-     * @param $path
166
+     * @param string $path
167 167
      *
168 168
      * @return null|string
169 169
      * @throws \Github\Exception\InvalidArgumentException
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     }
400 400
 
401 401
     /**
402
-     * @param $path
402
+     * @param string $path
403 403
      *
404 404
      * @return array
405 405
      *
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     /**
508 508
      * @param $subject
509 509
      * @param $key
510
-     * @return mixed
510
+     * @return boolean
511 511
      */
512 512
     private function hasKey(&$subject, $key)
513 513
     {
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
     }
558 558
 
559 559
     /**
560
-     * @param $path
560
+     * @param string $path
561 561
      * @return array
562 562
      * @throws \League\Flysystem\NotSupportedException
563 563
      * @throws \Github\Exception\RuntimeException
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
     }
630 630
 
631 631
     /**
632
-     * @param $path
632
+     * @param string $path
633 633
      * @param $function
634 634
      * @return array
635 635
      */
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     const GITHUB_API_URL = 'https://api.github.com';
43 43
     const GITHUB_URL = 'https://github.com';
44 44
 
45
-    const MIME_TYPE_DIRECTORY = 'directory';    // or application/x-directory
45
+    const MIME_TYPE_DIRECTORY = 'directory'; // or application/x-directory
46 46
 
47 47
     const NOT_RECURSIVE = false;
48 48
     const RECURSIVE = true;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     {
340 340
         $length = strlen($path);
341 341
 
342
-        $metadata = array_filter($tree, function ($entry) use ($path, $recursive, $length) {
342
+        $metadata = array_filter($tree, function($entry) use ($path, $recursive, $length) {
343 343
             $match = false;
344 344
 
345 345
             if ($path === '' || strpos($entry[self::KEY_PATH], $path) === 0) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
     {
365 365
         $visibility = AdapterInterface::VISIBILITY_PUBLIC;
366 366
 
367
-        if (! substr($permissions, -4) & 0044) {
367
+        if (!substr($permissions, -4) & 0044) {
368 368
             $visibility = AdapterInterface::VISIBILITY_PRIVATE;
369 369
         }
370 370
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             $treeData = [$treeData];
385 385
         }
386 386
 
387
-        $normalizedTreeData = array_map(function ($entry) {
387
+        $normalizedTreeData = array_map(function($entry) {
388 388
             $this->setEntryName($entry);
389 389
             $this->setEntryType($entry);
390 390
             $this->setEntryVisibility($entry);
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 
536 536
         $filteredTreeData = $this->filterTreeData($treeMetadata, $path, self::RECURSIVE);
537 537
 
538
-        array_walk($filteredTreeData, function ($entry) use (&$directoryTimestamp, $path) {
538
+        array_walk($filteredTreeData, function($entry) use (&$directoryTimestamp, $path) {
539 539
             if ($entry[self::KEY_TYPE] === self::KEY_FILE
540 540
                 && strpos($entry[self::KEY_PATH], $path) === 0
541 541
             ) {
@@ -584,9 +584,9 @@  discard block
 block discarded – undo
584 584
             $path
585 585
         );
586 586
 
587
-        $directoryContents =  $this->getDirectoryContents($path, self::RECURSIVE);
587
+        $directoryContents = $this->getDirectoryContents($path, self::RECURSIVE);
588 588
 
589
-        $directoryMetadata = array_filter($directoryContents, function ($entry) use ($path) {
589
+        $directoryMetadata = array_filter($directoryContents, function($entry) use ($path) {
590 590
             return $entry[self::KEY_PATH] === $path;
591 591
         });
592 592
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      */
616 616
     private function addTimestamps(array $treeData)
617 617
     {
618
-        return array_map(function ($entry) use ($treeData) {
618
+        return array_map(function($entry) use ($treeData) {
619 619
             if ($entry[self::KEY_TYPE] === self::KEY_DIRECTORY) {
620 620
                 $timestamp = $this->getDirectoryTimestamp($treeData, $entry[self::KEY_PATH]);
621 621
             } else {
Please login to merge, or discard this patch.