Completed
Pull Request — develop (#7)
by Ben
05:14
created
src/GithubAdapter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
      *
157 157
      * @param string $path
158 158
      *
159
-     * @return array|bool|null
159
+     * @return boolean
160 160
      */
161 161
     public function has($path)
162 162
     {
Please login to merge, or discard this patch.
src/Api.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         //@NOTE: The github API does not return a MIME type, so we have to guess :-(
213 213
         if (strrpos($path, '.') > 1) {
214
-            $extension = substr($path, strrpos($path, '.')+1);
214
+            $extension = substr($path, strrpos($path, '.') + 1);
215 215
             $mimeType = MimeType::detectByFileExtension($extension) ?: 'text/plain';
216 216
         } else {
217 217
             $content = $this->getFileContents($path);
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
      */
256 256
     private function extractMetaDataFromTreeInfo(array $tree, $path, $recursive)
257 257
     {
258
-        if(empty($path) === false) {
259
-            $metadata = array_filter($tree, function ($entry) use ($path, $recursive) {
258
+        if (empty($path) === false) {
259
+            $metadata = array_filter($tree, function($entry) use ($path, $recursive) {
260 260
                 $match = false;
261 261
 
262 262
                 if (strpos($entry[self::KEY_PATH], $path) === 0) {
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 return $match;
272 272
             });
273 273
         } elseif ($recursive === false) {
274
-            $metadata = array_filter($tree, function ($entry) use ($path) {
274
+            $metadata = array_filter($tree, function($entry) use ($path) {
275 275
                 return (strpos($entry[self::KEY_PATH], '/', strlen($path)) === false);
276 276
             });
277 277
         } else {
Please login to merge, or discard this patch.