Commit 74e08597 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Correction de violations PHPMD.

Showing with 15 additions and 15 deletions
+15 -15
......@@ -81,7 +81,7 @@ class UploadController extends Controller
'token' => $token
];
$delete_url = $this->router->generate('file_upload_delete', $parameters);
$deleteUrl = $this->router->generate('file_upload_delete', $parameters);
return $this->createResponse(
Response::HTTP_CREATED,
......@@ -90,10 +90,10 @@ class UploadController extends Controller
'id' => $file->getId(),
'put_url' => $this->router->generate('file_upload_put_content', $parameters),
'delete_type' => 'DELETE',
'delete_url' => $delete_url
'delete_url' => $deleteUrl,
],
// On a pas de get pour l'instant, le DELETE et ce qui y ressemble le plus
[ 'Location' => $delete_url ]
[ 'Location' => $deleteUrl ]
);
}
......
......@@ -318,15 +318,15 @@ class UploadedFile
return;
}
$fs = $this->filesystem;
$filesystem = $this->filesystem;
$path = $this->getPath();
if (!$fs->has($path)) {
if (!$filesystem->has($path)) {
$this->setEtat(self::ETAT_MANQUANT);
return;
}
if ($fs->size($path) !== $this->size || $fs->checksum($path) !== $this->checksum) {
if ($filesystem->size($path) !== $this->size || $filesystem->checksum($path) !== $this->checksum) {
$this->setEtat(self::ETAT_CORROMPU);
return;
}
......@@ -466,33 +466,33 @@ class UploadedFile
/** Wrapper de feof
*
* @param resource $fh
* @param resource $filehandle
* @return boolean
*/
protected function feof($fh)
protected function feof($filehandle)
{
return feof($fh);
return feof($filehandle);
}
/** Wrapper de fread
*
* @param resource $fh
* @param resource $filehandle
* @param int $maxlen
* @return int|boolean
*/
protected function fread($fh, $maxlen = -1)
protected function fread($filehandle, $maxlen = -1)
{
return fread($fh, $maxlen);
return fread($filehandle, $maxlen);
}
/** Wrapper de fwrite
*
* @param resource $fh
* @param resource $filehandle
* @param int $maxlen
* @return int|boolean
*/
protected function fwrite($fh, $maxlen = -1)
protected function fwrite($filehandle, $maxlen = -1)
{
return fwrite($fh, $maxlen);
return fwrite($filehandle, $maxlen);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment