]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix phpcs 3346/head
authorKevin Decherf <kevin@kdecherf.com>
Sun, 19 Nov 2017 14:26:13 +0000 (15:26 +0100)
committerKevin Decherf <kevin@kdecherf.com>
Sun, 19 Nov 2017 14:26:13 +0000 (15:26 +0100)
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
app/DoctrineMigrations/Version20171105202000.php
src/Wallabag/CoreBundle/Entity/Entry.php
tests/Wallabag/ApiBundle/Controller/EntryRestControllerTest.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php

index b1cff9cea7f334ee053a220e0e8cd89d885612d8..3769045feb1ba2c8b47c73d3040abf458db3885a 100644 (file)
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
- * Add origin_url column
+ * Add origin_url column.
  */
 class Version20171105202000 extends AbstractMigration implements ContainerAwareInterface
 {
index 445cc45e57b9ebfdf2faee457507c6b3cee84b77..2b1f2e050799c24495611d2ba75212e37944f4d5 100644 (file)
@@ -840,7 +840,7 @@ class Entry
 
         return $this;
     }
-    
+
     /**
      * Set origin url.
      *
@@ -854,7 +854,7 @@ class Entry
 
         return $this;
     }
-    
+
     /**
      * Get origin url.
      *
index 8f0effeea343ae30e5ce8b058e688d02f647c9f6..65a3ccd9a95a96d7b7e9d277df2c53e27c67a130 100644 (file)
@@ -712,28 +712,28 @@ class EntryRestControllerTest extends WallabagApiTestCase
         $this->assertSame($previousLanguage, $content['language'], 'Ensure language has not moved');
         $this->assertSame($previousTitle, $content['title'], 'Ensure title has not moved');
     }
-    
-        public function testPatchEntryNullOriginUrl()
-        {
-            $entry = $this->client->getContainer()
+
+    public function testPatchEntryNullOriginUrl()
+    {
+        $entry = $this->client->getContainer()
             ->get('doctrine.orm.entity_manager')
             ->getRepository('WallabagCoreBundle:Entry')
             ->findOneByUser(1);
-    
-            if (!$entry) {
-                $this->markTestSkipped('No content found in db.');
-            }
-    
-            $this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [
+
+        if (!$entry) {
+            $this->markTestSkipped('No content found in db.');
+        }
+
+        $this->client->request('PATCH', '/api/entries/' . $entry->getId() . '.json', [
                 'origin_url' => null,
             ]);
-    
-            $this->assertSame(200, $this->client->getResponse()->getStatusCode());
-    
-            $content = json_decode($this->client->getResponse()->getContent(), true);
-    
-            $this->assertNull($content['origin_url']);
-        }
+
+        $this->assertSame(200, $this->client->getResponse()->getStatusCode());
+
+        $content = json_decode($this->client->getResponse()->getContent(), true);
+
+        $this->assertNull($content['origin_url']);
+    }
 
     public function testGetTagsEntry()
     {
index e2fb8d7802f7fad3dc91ef0529858cfbef730878..c6a523e3f98fd7cb9679ef96b22c9c8b1f4ddb3a 100644 (file)
@@ -519,7 +519,7 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text']));
         $this->assertContains('My updated title hehe :)', $title[0]);
-        $this->assertSame(1, sizeof($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text'])));
+        $this->assertSame(1, count($stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text'])));
         $this->assertNotContains('example.io', trim($stats[0]));
     }
 
index 27989346197d3c114490ed6906e5316c6797a73c..82336060fb79356447b868a342e2de40d5791631 100644 (file)
@@ -50,7 +50,7 @@ class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
             ->getMock();
 
         $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
-        
+
         $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('www.lemonde.fr'));
         $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('http://lemonde.fr'));
         $this->assertSame('lemonde.fr', $extension->removeSchemeAndWww('https://www.lemonde.fr'));