Completed
Pull Request — master (#38)
by Ben
14s
created
src/Api.php 1 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.