Răsfoiți Sursa

chore: apply StyleCI recommendation

El RIDO 1 săptămână în urmă
părinte
comite
c52973d486
2 a modificat fișierele cu 7 adăugiri și 7 ștergeri
  1. 2 2
      lib/Request.php
  2. 5 5
      tst/ControllerTest.php

+ 2 - 2
lib/Request.php

@@ -12,8 +12,8 @@
 namespace PrivateBin;
 
 use JsonException;
-use PrivateBin\Model\Paste;
 use PrivateBin\Exception\TranslatedException;
+use PrivateBin\Model\Paste;
 
 /**
  * Request
@@ -216,7 +216,7 @@ class Request
         if ($this->_bodyLength > $sizelimit) {
             throw new TranslatedException([
                 'Document is limited to %s of encrypted data.',
-                Filter::formatHumanReadableSize($sizelimit)
+                Filter::formatHumanReadableSize($sizelimit),
             ]);
         }
         $data = [

+ 5 - 5
tst/ControllerTest.php

@@ -278,19 +278,19 @@ class ControllerTest extends TestCase
      */
     public function testCreateOverSize()
     {
-        $options                      = parse_ini_file(CONF, true);
+        $options = parse_ini_file(CONF, true);
         $options['main']['sizelimit'] = 1000;
-        $options['traffic']['limit']  = 0;
+        $options['traffic']['limit'] = 0;
         Helper::createIniFile(CONF, $options);
         $paste = Helper::getPastePost();
         // add some extra authenticated data, could be a hypothetical future cryptographic hash, exceeding the sizelimit
         $paste['adata'][] = str_repeat('0', $options['main']['sizelimit']);
-        $file  = Helper::createTempFile();
+        $file = Helper::createTempFile();
         file_put_contents($file, json_encode($paste));
         Request::setInputStream($file);
         $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest';
-        $_SERVER['REQUEST_METHOD']        = 'POST';
-        $_SERVER['REMOTE_ADDR']           = '::1';
+        $_SERVER['REQUEST_METHOD'] = 'POST';
+        $_SERVER['REMOTE_ADDR'] = '::1';
         ob_start();
         new Controller;
         $content = ob_get_contents();