refactored 80%
[pharext/pharext.org] / app / Github / API / Repos / ContentsCallback.php
index c08c3c2284750b086e318ae0b79438c61626fd2c..2be3b6e3247dd8487da29be207f7bf5a775709a4 100644 (file)
@@ -14,7 +14,7 @@ class ContentsCallback extends Callback
                $this->repo = $repo;
        }
        
-       function __invoke($json, $links = null) {
+       protected function exec($json, $links = null) {
                foreach ($json as $entry) {
                        if ($entry->type !== "file" || $entry->size <= 0) {
                                continue;
@@ -27,5 +27,6 @@ class ContentsCallback extends Callback
                                $this->repo->pharext_package_php = $entry->name;
                        }
                }
+               return $json;
        }
 }