@@ -56,6 +56,10 @@ discard block |
||
56 | 56 | /** @var string */ |
57 | 57 | private $documentLibraryTitle; |
58 | 58 | |
59 | + /** |
|
60 | + * @param string $sharePointUrl |
|
61 | + * @param string $documentLibraryTitle |
|
62 | + */ |
|
59 | 63 | public function __construct(ContextsFactory $contextsFactory, $sharePointUrl, array $credentials, $documentLibraryTitle) { |
60 | 64 | $this->contextsFactory = $contextsFactory; |
61 | 65 | $this->sharePointUrl = $sharePointUrl; |
@@ -116,7 +120,7 @@ discard block |
||
116 | 120 | * adds a folder on the given server path |
117 | 121 | * |
118 | 122 | * @param string $relativeServerPath |
119 | - * @return Folder |
|
123 | + * @return string |
|
120 | 124 | * @throws \Exception |
121 | 125 | */ |
122 | 126 | public function createFolder($relativeServerPath) { |
@@ -137,7 +141,7 @@ discard block |
||
137 | 141 | /** |
138 | 142 | * downloads a file by passing it directly into a file resource |
139 | 143 | * |
140 | - * @param $relativeServerPath |
|
144 | + * @param string $relativeServerPath |
|
141 | 145 | * @param resource $fp a file resource open for writing |
142 | 146 | * @return \Office365\PHP\Client\Runtime\OData\ODataPayload |
143 | 147 | * @throws \Exception |
@@ -203,9 +207,9 @@ discard block |
||
203 | 207 | * needs to reimplement adding-file-tp-sp-logic quite some… perhaps upload an |
204 | 208 | * empty file and continue with overwriteFileViaStream? |
205 | 209 | * |
206 | - * @param $relativeServerPath |
|
207 | - * @param $content |
|
208 | - * @return File |
|
210 | + * @param string $relativeServerPath |
|
211 | + * @param string $content |
|
212 | + * @return string |
|
209 | 213 | * @throws \Exception |
210 | 214 | */ |
211 | 215 | public function uploadNewFile($relativeServerPath, $content) { |
@@ -381,6 +381,9 @@ discard block |
||
381 | 381 | return false; |
382 | 382 | } |
383 | 383 | |
384 | + /** |
|
385 | + * @param string $path |
|
386 | + */ |
|
384 | 387 | public function writeBack($tmpFile, $path) { |
385 | 388 | $serverUrl = $this->formatPath($path); |
386 | 389 | $content = file_get_contents($tmpFile); |
@@ -458,7 +461,7 @@ discard block |
||
458 | 461 | } |
459 | 462 | |
460 | 463 | /** |
461 | - * @param $serverUrl |
|
464 | + * @param string $serverUrl |
|
462 | 465 | * @return ClientObjectCollection[] |
463 | 466 | */ |
464 | 467 | private function getFolderContents($serverUrl) { |
@@ -490,7 +493,7 @@ discard block |
||
490 | 493 | } |
491 | 494 | |
492 | 495 | /** |
493 | - * @param $serverUrl |
|
496 | + * @param string $serverUrl |
|
494 | 497 | * @return File|Folder |
495 | 498 | * @throws NotFoundException |
496 | 499 | */ |