]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1036 from j0k3r/refactor-update-composer
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sat, 31 Jan 2015 20:49:44 +0000 (21:49 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Sat, 31 Jan 2015 20:49:44 +0000 (21:49 +0100)
Update composer

47 files changed:
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/Controller/SecurityController.php
src/Wallabag/CoreBundle/Controller/WallabagRestController.php
src/Wallabag/CoreBundle/DependencyInjection/Security/Factory/WsseFactory.php
src/Wallabag/CoreBundle/Entity/Config.php
src/Wallabag/CoreBundle/Entity/Entries.php
src/Wallabag/CoreBundle/Entity/Tags.php
src/Wallabag/CoreBundle/Entity/TagsEntries.php
src/Wallabag/CoreBundle/Entity/Users.php
src/Wallabag/CoreBundle/Entity/UsersConfig.php
src/Wallabag/CoreBundle/Helper/Content.php
src/Wallabag/CoreBundle/Helper/Entries.php
src/Wallabag/CoreBundle/Helper/Tools.php
src/Wallabag/CoreBundle/Helper/Url.php
src/Wallabag/CoreBundle/Repository/EntriesRepository.php
src/Wallabag/CoreBundle/Resources/config/routing.yml
src/Wallabag/CoreBundle/Resources/config/routing_rest.yml
src/Wallabag/CoreBundle/Resources/config/services.xml
src/Wallabag/CoreBundle/Resources/views/Entry/entry.html.twig
src/Wallabag/CoreBundle/Resources/views/Entry/new.html.twig
src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig
src/Wallabag/CoreBundle/Resources/views/_bookmarklet.html.twig
src/Wallabag/CoreBundle/Resources/views/_footer.html.twig
src/Wallabag/CoreBundle/Resources/views/_head.html.twig
src/Wallabag/CoreBundle/Resources/views/_menu.html.twig
src/Wallabag/CoreBundle/Resources/views/baggy/config.twig
src/Wallabag/CoreBundle/Resources/views/baggy/layout-login.twig
src/Wallabag/CoreBundle/Resources/views/baggy/login.twig
src/Wallabag/CoreBundle/Resources/views/default/_bookmarklet.twig
src/Wallabag/CoreBundle/Resources/views/default/_footer.twig
src/Wallabag/CoreBundle/Resources/views/default/_import.twig
src/Wallabag/CoreBundle/Resources/views/default/_menu.twig
src/Wallabag/CoreBundle/Resources/views/default/_messages.twig
src/Wallabag/CoreBundle/Resources/views/default/_search-form.twig
src/Wallabag/CoreBundle/Resources/views/default/about.twig
src/Wallabag/CoreBundle/Resources/views/default/config.twig
src/Wallabag/CoreBundle/Resources/views/default/export.twig
src/Wallabag/CoreBundle/Resources/views/default/layout.twig
src/Wallabag/CoreBundle/Resources/views/default/tags.twig
src/Wallabag/CoreBundle/Resources/views/default/view.twig
src/Wallabag/CoreBundle/Resources/views/layout-login.html.twig
src/Wallabag/CoreBundle/Resources/views/layout.html.twig
src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
src/Wallabag/CoreBundle/Security/Authentication/Token/WsseUserToken.php
src/Wallabag/CoreBundle/Security/Firewall/WsseListener.php
src/Wallabag/CoreBundle/Service/Extractor.php
src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php

index 25f1871152d104b2f0e76d00c872888695ec5d5e..377a45ae79da8c3b88b46c84863146683916e50c 100644 (file)
@@ -8,14 +8,12 @@ use Symfony\Component\HttpFoundation\Request;
 use Wallabag\CoreBundle\Repository;
 use Wallabag\CoreBundle\Entity\Entries;
 use Wallabag\CoreBundle\Service\Extractor;
-use Wallabag\CoreBundle\Helper\Tools;
 use Wallabag\CoreBundle\Helper\Url;
 
 class EntryController extends Controller
 {
-
     /**
-     * @param Request $request
+     * @param  Request                                    $request
      * @Route("/new", name="new_entry")
      * @return \Symfony\Component\HttpFoundation\Response
      */
@@ -32,7 +30,6 @@ class EntryController extends Controller
         $form->handleRequest($request);
 
         if ($form->isValid()) {
-
             $content = Extractor::extract($entry->getUrl());
 
             $entry->setTitle($content->getTitle());
@@ -115,7 +112,7 @@ class EntryController extends Controller
     /**
      * Shows entry content
      *
-     * @param Entries $entry
+     * @param  Entries                                    $entry
      * @Route("/view/{id}", requirements={"id" = "\d+"}, name="view")
      * @return \Symfony\Component\HttpFoundation\Response
      */
@@ -130,8 +127,8 @@ class EntryController extends Controller
     /**
      * Changes read status for an entry
      *
-     * @param Request $request
-     * @param Entries $entry
+     * @param  Request                                            $request
+     * @param  Entries                                            $entry
      * @Route("/archive/{id}", requirements={"id" = "\d+"}, name="archive_entry")
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
@@ -151,8 +148,8 @@ class EntryController extends Controller
     /**
      * Changes favorite status for an entry
      *
-     * @param Request $request
-     * @param Entries $entry
+     * @param  Request                                            $request
+     * @param  Entries                                            $entry
      * @Route("/star/{id}", requirements={"id" = "\d+"}, name="star_entry")
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
@@ -172,8 +169,8 @@ class EntryController extends Controller
     /**
      * Deletes entry
      *
-     * @param Request $request
-     * @param Entries $entry
+     * @param  Request                                            $request
+     * @param  Entries                                            $entry
      * @Route("/delete/{id}", requirements={"id" = "\d+"}, name="delete_entry")
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
index 51f9cc265fa5dfabec5bdb7e515715915119e29d..c2901da2eb2ccfc9b9cbdd4515a05c1c4ebeadef 100644 (file)
@@ -18,10 +18,11 @@ class SecurityController extends Controller
             $error = $session->get(SecurityContext::AUTHENTICATION_ERROR);
             $session->remove(SecurityContext::AUTHENTICATION_ERROR);
         }
+
         return $this->render('WallabagCoreBundle:Security:login.html.twig', array(
             // last username entered by the user
             'last_username' => $session->get(SecurityContext::LAST_USERNAME),
             'error'         => $error,
         ));
     }
-}
\ No newline at end of file
+}
index 8e018e88bce675cb4b15ca10e23645396e361b6a..5668d9348627e97fc9c66e6eb4af0a1fbf0fc5f8 100644 (file)
@@ -3,7 +3,6 @@
 namespace Wallabag\CoreBundle\Controller;
 
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
-use FOS\RestBundle\Controller\Annotations\View;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
 use Wallabag\CoreBundle\Entity\Entries;
@@ -12,7 +11,6 @@ use Wallabag\CoreBundle\Service\Extractor;
 
 class WallabagRestController extends Controller
 {
-
     /**
      * Retrieve all entries. It could be filtered by many options.
      *
@@ -44,14 +42,13 @@ class WallabagRestController extends Controller
         $entries = $this
             ->getDoctrine()
             ->getRepository('WallabagCoreBundle:Entries')
-            ->findEntries(1, (int)$isArchived, (int)$isStarred, (int)$isDeleted, $sort, $order);
+            ->findEntries(1, (int) $isArchived, (int) $isStarred, (int) $isDeleted, $sort, $order);
 
-        if(!is_array($entries)) {
+        if (!is_array($entries)) {
             throw $this->createNotFoundException();
         }
 
         return $entries;
-
     }
 
     /**
@@ -119,7 +116,6 @@ class WallabagRestController extends Controller
      */
     public function patchEntriesAction(Entries $entry)
     {
-
     }
 
     /**
@@ -133,10 +129,8 @@ class WallabagRestController extends Controller
      */
     public function deleteEntriesAction(Entries $entry)
     {
-
     }
 
-
     /**
      * Retrieve all tags for an entry
      *
@@ -146,8 +140,8 @@ class WallabagRestController extends Controller
      *      }
      * )
      */
-    public function getEntriesTagsAction(Entries $entry) {
-
+    public function getEntriesTagsAction(Entries $entry)
+    {
     }
 
     /**
@@ -162,8 +156,8 @@ class WallabagRestController extends Controller
      *       }
      * )
      */
-    public function postEntriesTagsAction(Entries $entry) {
-
+    public function postEntriesTagsAction(Entries $entry)
+    {
     }
 
     /**
@@ -178,7 +172,6 @@ class WallabagRestController extends Controller
      */
     public function deleteEntriesTagsAction(Entries $entry, Tags $tag)
     {
-
     }
 
     /**
@@ -187,8 +180,8 @@ class WallabagRestController extends Controller
      * @ApiDoc(
      * )
      */
-    public function getTagsAction() {
-
+    public function getTagsAction()
+    {
     }
 
     /**
@@ -200,8 +193,8 @@ class WallabagRestController extends Controller
      *       }
      * )
      */
-    public function getTagAction(Tags $tag) {
-
+    public function getTagAction(Tags $tag)
+    {
     }
 
     /**
@@ -215,6 +208,5 @@ class WallabagRestController extends Controller
      */
     public function deleteTagAction(Tags $tag)
     {
-
     }
-}
\ No newline at end of file
+}
index 9807fe9af453f21c4bf656946ba83d6401906241..0b5bdb40aad21ccbd2c19356c76a22aa651994af 100644 (file)
@@ -37,4 +37,4 @@ class WsseFactory implements SecurityFactoryInterface
     public function addConfiguration(NodeDefinition $node)
     {
     }
-}
\ No newline at end of file
+}
index d60b2df04a417b6aa6cb0b7de79657a16eaf18d4..045ca308ee99991303ae0ecb95c3a0bc7f565cdf 100644 (file)
@@ -35,12 +35,10 @@ class Config
      */
     private $value;
 
-
-
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -50,7 +48,7 @@ class Config
     /**
      * Set name
      *
-     * @param string $name
+     * @param  string $name
      * @return Config
      */
     public function setName($name)
@@ -63,7 +61,7 @@ class Config
     /**
      * Get name
      *
-     * @return string 
+     * @return string
      */
     public function getName()
     {
@@ -73,7 +71,7 @@ class Config
     /**
      * Set value
      *
-     * @param string $value
+     * @param  string $value
      * @return Config
      */
     public function setValue($value)
@@ -86,7 +84,7 @@ class Config
     /**
      * Get value
      *
-     * @return string 
+     * @return string
      */
     public function getValue()
     {
index 3c061a37bc5f1dad223b6344d484f92462521bb2..9da5102cae34a1cfe4c0086e47b2d222cf023be8 100644 (file)
@@ -66,12 +66,10 @@ class Entries
      */
     private $userId;
 
-
-
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -81,7 +79,7 @@ class Entries
     /**
      * Set title
      *
-     * @param string $title
+     * @param  string  $title
      * @return Entries
      */
     public function setTitle($title)
@@ -94,7 +92,7 @@ class Entries
     /**
      * Get title
      *
-     * @return string 
+     * @return string
      */
     public function getTitle()
     {
@@ -104,7 +102,7 @@ class Entries
     /**
      * Set url
      *
-     * @param string $url
+     * @param  string  $url
      * @return Entries
      */
     public function setUrl($url)
@@ -117,7 +115,7 @@ class Entries
     /**
      * Get url
      *
-     * @return string 
+     * @return string
      */
     public function getUrl()
     {
@@ -127,7 +125,7 @@ class Entries
     /**
      * Set isRead
      *
-     * @param string $isRead
+     * @param  string  $isRead
      * @return Entries
      */
     public function setIsRead($isRead)
@@ -140,7 +138,7 @@ class Entries
     /**
      * Get isRead
      *
-     * @return string 
+     * @return string
      */
     public function getIsRead()
     {
@@ -150,13 +148,14 @@ class Entries
     public function toggleArchive()
     {
         $this->isRead = $this->getIsRead() ^ 1;
+
         return $this;
     }
 
     /**
      * Set isFav
      *
-     * @param string $isFav
+     * @param  string  $isFav
      * @return Entries
      */
     public function setIsFav($isFav)
@@ -169,7 +168,7 @@ class Entries
     /**
      * Get isFav
      *
-     * @return string 
+     * @return string
      */
     public function getIsFav()
     {
@@ -186,7 +185,7 @@ class Entries
     /**
      * Set content
      *
-     * @param string $content
+     * @param  string  $content
      * @return Entries
      */
     public function setContent($content)
@@ -199,7 +198,7 @@ class Entries
     /**
      * Get content
      *
-     * @return string 
+     * @return string
      */
     public function getContent()
     {
@@ -209,7 +208,7 @@ class Entries
     /**
      * Set userId
      *
-     * @param string $userId
+     * @param  string  $userId
      * @return Entries
      */
     public function setUserId($userId)
@@ -222,7 +221,7 @@ class Entries
     /**
      * Get userId
      *
-     * @return string 
+     * @return string
      */
     public function getUserId()
     {
index 6fe16a5355f47e7f0cc3bd471207c0355702c8fb..eab91ba00be2c45e7e3a8db022fb63d620786eb0 100644 (file)
@@ -28,12 +28,10 @@ class Tags
      */
     private $value;
 
-
-
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -43,7 +41,7 @@ class Tags
     /**
      * Set value
      *
-     * @param string $value
+     * @param  string $value
      * @return Tags
      */
     public function setValue($value)
@@ -56,7 +54,7 @@ class Tags
     /**
      * Get value
      *
-     * @return string 
+     * @return string
      */
     public function getValue()
     {
index ad01cf575e686d2057101b701aff4dea507510b7..6b0cea0ddf5bad6114f6636b4707dbbb26c28a4f 100644 (file)
@@ -35,12 +35,10 @@ class TagsEntries
      */
     private $tagId;
 
-
-
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -50,7 +48,7 @@ class TagsEntries
     /**
      * Set entryId
      *
-     * @param integer $entryId
+     * @param  integer     $entryId
      * @return TagsEntries
      */
     public function setEntryId($entryId)
@@ -63,7 +61,7 @@ class TagsEntries
     /**
      * Get entryId
      *
-     * @return integer 
+     * @return integer
      */
     public function getEntryId()
     {
@@ -73,7 +71,7 @@ class TagsEntries
     /**
      * Set tagId
      *
-     * @param integer $tagId
+     * @param  integer     $tagId
      * @return TagsEntries
      */
     public function setTagId($tagId)
@@ -86,7 +84,7 @@ class TagsEntries
     /**
      * Get tagId
      *
-     * @return integer 
+     * @return integer
      */
     public function getTagId()
     {
index 96867bd612f1d3b993a4749a9fb5f8394f403fbd..e0b1fb39f3e4d5bd54039e8214ecfa8a59de4aaf 100644 (file)
@@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle\Entity;
 
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Security\Core\User\UserInterface;
-use Symfony\Component\Security\Core\User\EquatableInterface;
 use Symfony\Component\Security\Core\User\AdvancedUserInterface;
 
 /**
@@ -71,7 +70,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -81,7 +80,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Set username
      *
-     * @param string $username
+     * @param  string $username
      * @return Users
      */
     public function setUsername($username)
@@ -94,7 +93,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Get username
      *
-     * @return string 
+     * @return string
      */
     public function getUsername()
     {
@@ -120,7 +119,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Set password
      *
-     * @param string $password
+     * @param  string $password
      * @return Users
      */
     public function setPassword($password)
@@ -133,7 +132,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Get password
      *
-     * @return string 
+     * @return string
      */
     public function getPassword()
     {
@@ -143,7 +142,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Set name
      *
-     * @param string $name
+     * @param  string $name
      * @return Users
      */
     public function setName($name)
@@ -156,7 +155,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Get name
      *
-     * @return string 
+     * @return string
      */
     public function getName()
     {
@@ -166,7 +165,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Set email
      *
-     * @param string $email
+     * @param  string $email
      * @return Users
      */
     public function setEmail($email)
@@ -179,7 +178,7 @@ class Users implements AdvancedUserInterface, \Serializable
     /**
      * Get email
      *
-     * @return string 
+     * @return string
      */
     public function getEmail()
     {
@@ -208,7 +207,7 @@ class Users implements AdvancedUserInterface, \Serializable
      */
     public function unserialize($serialized)
     {
-        list (
+        list(
             $this->id,
             ) = unserialize($serialized);
     }
index 26fb44ee4d41447c3fa1706c6b3d0c902bc4c30a..0742edbcb986857db569a3f4030f512baa2841b0 100644 (file)
@@ -42,12 +42,10 @@ class UsersConfig
      */
     private $value;
 
-
-
     /**
      * Get id
      *
-     * @return integer 
+     * @return integer
      */
     public function getId()
     {
@@ -57,7 +55,7 @@ class UsersConfig
     /**
      * Set userId
      *
-     * @param string $userId
+     * @param  string      $userId
      * @return UsersConfig
      */
     public function setUserId($userId)
@@ -70,7 +68,7 @@ class UsersConfig
     /**
      * Get userId
      *
-     * @return string 
+     * @return string
      */
     public function getUserId()
     {
@@ -80,7 +78,7 @@ class UsersConfig
     /**
      * Set name
      *
-     * @param string $name
+     * @param  string      $name
      * @return UsersConfig
      */
     public function setName($name)
@@ -93,7 +91,7 @@ class UsersConfig
     /**
      * Get name
      *
-     * @return string 
+     * @return string
      */
     public function getName()
     {
@@ -103,7 +101,7 @@ class UsersConfig
     /**
      * Set value
      *
-     * @param string $value
+     * @param  string      $value
      * @return UsersConfig
      */
     public function setValue($value)
@@ -116,7 +114,7 @@ class UsersConfig
     /**
      * Get value
      *
-     * @return string 
+     * @return string
      */
     public function getValue()
     {
index 81acbad7c967fcb40fe16bd9b4f32ff85020019a..1cc5e4cf87012b586f45b8738163d642e01a0c17 100644 (file)
@@ -8,8 +8,8 @@ class Content
 
     private $body;
 
-    public function __constructor() {
-
+    public function __constructor()
+    {
     }
 
     public function getTitle()
@@ -31,4 +31,4 @@ class Content
     {
         $this->body = $body;
     }
-}
\ No newline at end of file
+}
index a54c3a74d2fe86c9c96e628bc1ac794032f58030..6eeca4ff8f266d87866fa6dc2b5a60d74f476738 100644 (file)
@@ -2,9 +2,6 @@
 
 namespace Wallabag\CoreBundle\Helper;
 
-
-class Entries {
-
-
-
-}
\ No newline at end of file
+class Entries
+{
+}
index c932f880fd452466693ed7a0e8946a9a8c2ed95f..0fd5f259c42d5fd56adb2a6151f57ee8a6207dc6 100755 (executable)
@@ -2,9 +2,6 @@
 
 namespace Wallabag\CoreBundle\Helper;
 
-use \RecursiveIteratorIterator;
-use \RecursiveDirectoryIterator;
-
 final class Tools
 {
     /**
@@ -18,7 +15,7 @@ final class Tools
         $timeout = 15;
         $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0";
 
-        if (in_array ('curl', get_loaded_extensions())) {
+        if (in_array('curl', get_loaded_extensions())) {
             # Fetch feed from URL
             $curl = curl_init();
             curl_setopt($curl, CURLOPT_URL, $url);
@@ -30,8 +27,8 @@ final class Tools
             curl_setopt($curl, CURLOPT_HEADER, false);
 
             # for ssl, do not verified certificate
-            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
-            curl_setopt($curl, CURLOPT_AUTOREFERER, TRUE );
+            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
+            curl_setopt($curl, CURLOPT_AUTOREFERER, true);
 
             # FeedBurner requires a proper USER-AGENT...
             curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);
@@ -48,13 +45,13 @@ final class Tools
                 array(
                     'http' => array(
                         'timeout' => $timeout,
-                        'header' => "User-Agent: " . $useragent,
-                        'follow_location' => true
+                        'header' => "User-Agent: ".$useragent,
+                        'follow_location' => true,
                     ),
                     'ssl' => array(
                         'verify_peer' => false,
-                        'allow_self_signed' => true
-                    )
+                        'allow_self_signed' => true,
+                    ),
                 )
             );
 
@@ -62,13 +59,12 @@ final class Tools
             $data = @file_get_contents($url, false, $context, -1, 4000000);
 
             if (isset($http_response_header) and isset($http_response_header[0])) {
-                $httpcodeOK = isset($http_response_header) and isset($http_response_header[0]) and ((strpos($http_response_header[0], '200 OK') !== FALSE) or (strpos($http_response_header[0], '301 Moved Permanently') !== FALSE));
+                $httpcodeOK = isset($http_response_header) and isset($http_response_header[0]) and ((strpos($http_response_header[0], '200 OK') !== false) or (strpos($http_response_header[0], '301 Moved Permanently') !== false));
             }
         }
 
         # if response is not empty and response is OK
         if (isset($data) and isset($httpcodeOK) and $httpcodeOK) {
-
             # take charset of page and get it
             preg_match('#<meta .*charset=.*>#Usi', $data, $meta);
 
@@ -77,19 +73,20 @@ final class Tools
                 preg_match('#charset="?(.*)"#si', $meta[0], $encoding);
                 # if charset is found set it otherwise, set it to utf-8
                 $html_charset = (!empty($encoding[1])) ? strtolower($encoding[1]) : 'utf-8';
-                if (empty($encoding[1])) $encoding[1] = 'utf-8';
+                if (empty($encoding[1])) {
+                    $encoding[1] = 'utf-8';
+                }
             } else {
                 $html_charset = 'utf-8';
                 $encoding[1] = '';
             }
 
             # replace charset of url to charset of page
-            $data = str_replace('charset=' . $encoding[1], 'charset=' . $html_charset, $data);
+            $data = str_replace('charset='.$encoding[1], 'charset='.$html_charset, $data);
 
             return $data;
-        }
-        else {
-            return FALSE;
+        } else {
+            return false;
         }
     }
 
@@ -101,7 +98,7 @@ final class Tools
      */
     public static function encodeString($string)
     {
-        return sha1($string . SALT);
+        return sha1($string.SALT);
     }
 
     public static function generateToken()
@@ -113,12 +110,10 @@ final class Tools
             } else {
                 $token = substr(base64_encode(file_get_contents('/dev/urandom', false, null, 0, 20)), 0, 15);
             }
-        }
-        else {
+        } else {
             $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20);
         }
 
         return str_replace('+', '', $token);
     }
-
 }
index b076e7c729f4e592c44b166f25c51a9f254acce9..35eb260d062fa62c534f8932bcda0b1795008ea1 100644 (file)
@@ -6,20 +6,23 @@ class Url
 {
     public $url;
 
-    function __construct($url)
+    public function __construct($url)
     {
         $this->url = base64_decode($url);
     }
 
-    public function getUrl() {
+    public function getUrl()
+    {
         return $this->url;
     }
 
-    public function setUrl($url) {
+    public function setUrl($url)
+    {
         $this->url = $url;
     }
 
-    public function isCorrect() {
-        return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE;
+    public function isCorrect()
+    {
+        return filter_var($this->url, FILTER_VALIDATE_URL) !== false;
     }
-}
\ No newline at end of file
+}
index e63c67e2c3be44b5cb588b8adf153a822803fcaf..d87eb373069ebf9ea37ad386cdf2ed891518d8bd 100644 (file)
@@ -6,7 +6,6 @@ use Doctrine\ORM\Query;
 use Doctrine\ORM\EntityRepository;
 use Doctrine\ORM\Tools\Pagination\Paginator;
 use Wallabag\CoreBundle\Entity\Entries;
-use Wallabag\CoreBundle\Service\Extractor;
 
 class EntriesRepository extends EntityRepository
 {
@@ -15,7 +14,7 @@ class EntriesRepository extends EntityRepository
      *
      * @param $userId
      * @param $firstResult
-     * @param int $maxResults
+     * @param  int       $maxResults
      * @return Paginator
      */
     public function findUnreadByUser($userId, $firstResult, $maxResults = 12)
@@ -38,7 +37,7 @@ class EntriesRepository extends EntityRepository
      *
      * @param $userId
      * @param $firstResult
-     * @param int $maxResults
+     * @param  int       $maxResults
      * @return Paginator
      */
     public function findArchiveByUser($userId, $firstResult, $maxResults = 12)
@@ -61,7 +60,7 @@ class EntriesRepository extends EntityRepository
      *
      * @param $userId
      * @param $firstResult
-     * @param int $maxResults
+     * @param  int       $maxResults
      * @return Paginator
      */
     public function findStarredByUser($userId, $firstResult, $maxResults = 12)
index 327d49d8ba4d3d7dfe605e4e0a8321f93d124de7..ec1d23cc9f6f0e0d7526e36bcfbfc73d9a6c46f2 100644 (file)
@@ -1,3 +1,3 @@
 _wllbg:
     resource: "@WallabagCoreBundle/Controller/EntryController.php"
-    type:     annotation
\ No newline at end of file
+    type:     annotation
index c876adfb011ba767b3d463faca5461cadff115ea..d3af6b72b65f79019ea91e044b77366159e078f5 100644 (file)
@@ -1,4 +1,4 @@
 entries:
   type: rest
   resource:     "WallabagCoreBundle:WallabagRest"
-  name_prefix:  api_
\ No newline at end of file
+  name_prefix:  api_
index d5bc5cca5f864b5571e64c6876a017f2f31b4fe1..859665ca9a7ec502069e3bb1b514bbf82631cb46 100644 (file)
@@ -25,5 +25,3 @@
     </services>
 
 </container>
-
-
index 78dfa7c0ac92db7b39601c7fb16499bbd4027f59..edb15d557184f613753c8172963e992607cbb02c 100644 (file)
             });
         });
     </script>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index df6926a0f70e706439dc67a8f19a035b96d9b0a6..b6de7d23680f172814d262abda48eafbf418fb24 100644 (file)
@@ -8,4 +8,4 @@
 
 {% block content %}
     {{ form(form) }}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index 0585eccabee41dd430eeb0a71ac24f9adbc1fd7d..b8d3c7b61d15b8fe3b3a023563bebe55d17d9702 100755 (executable)
     <p>{% trans %}wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted.{% endtrans %}</p>
 
     <h2>{% trans %}Getting help{% endtrans %}</h2>
-    
+
     <dl>
         <dt>{% trans %}Documentation{% endtrans %}</dt>
         <dd><a href="https://doc.wallabag.org/">Online documentation</a></dd>
-        
+
         <dt>{% trans %}Support{% endtrans %}</dt>
         <dd><a href="http://support.wallabag.org/">http://support.wallabag.org/</a></dd>
     </dl>
index d432909a3004fc8de1003e4880ac31e541d982d3..fd662c190fc4d458bef8c84ae7e55ecdcc16975d 100644 (file)
@@ -1,3 +1,3 @@
         <script type="text/javascript">
           top["bookmarklet-url@wallabag.org"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>bag it!</title>"+'<link rel="icon" href="tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>"
-        </script>
\ No newline at end of file
+        </script>
index c897a97e40067bc287363da42ba5ee6e17ed4ce2..26411da9e4759451ca5918ffa5b9c5e91b4e199b 100644 (file)
@@ -1,3 +1,3 @@
         <footer class="w600p center mt3 mb3 smaller txtright">
             <p>{% trans %}powered by{% endtrans %} <a href="http://wallabag.org">wallabag</a></p>
-        </footer>
\ No newline at end of file
+        </footer>
index 7ef79a2f0a6596e241bd757e4571171a2a933390..f123183b8548c7ba4b860ca2f1df1dfc55bc8993 100755 (executable)
@@ -37,4 +37,3 @@
         <script src="{{ asset('themes/_global/js/saveLink.js') }}"></script>
         <script src="{{ asset('themes/_global/js/popupForm.js') }}"></script>
         <script src="{{ asset('themes/baggy/js/closeMessage.js') }}"></script>
-
index 3065ce4461d2acdeec75e21fc25a217328bc21ee..2e3b6d082a16efc20a38c203a254cb889e4ff7ef 100644 (file)
@@ -12,4 +12,3 @@
                 <li><a href={{ path('about') }}>{% trans %}about{% endtrans %}</a></li>
                 <li><a class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
             </ul>
-
index 6031f489c00e6f6a4679120593aa2925b107ba33..c5c07d492d3a30dc4cef93f778caf8e951dc6fde 100755 (executable)
                 </div>
                 </fieldset>
             </form>
-            
+
             <h2>{% trans "Delete account" %}</h2>
             {% if not only_user %}<form method="post" action="?deluser">
             <p>{% trans "You can delete your account by entering your password and validating." %}<br /><b>{% trans "Be careful, data will be erased forever (that is a very long time)." %}</b></p>
index 4078fbb08d8b491fa78daf6fb09f4b1266939c6a..ae3f086ce6cf18787dd0cd3eb5cce86e6376bb19 100644 (file)
@@ -28,4 +28,4 @@
         </div>
 {% include '_footer.twig' %}
     </body>
-</html>
\ No newline at end of file
+</html>
index 58290e9c646cf68dcbea0dd44c29ffd57e59efa5..d4eb46d21d9edc490ad20682ecf1c57f32d080dc 100644 (file)
@@ -17,7 +17,7 @@
                                                <input class="col" type="password" id="password" name="password" placeholder="{% trans "Password" %}" tabindex="2" {% if constant('MODE_DEMO') == 1 %}value="poche"{% endif %} />
                                        </div>
                                        <div class="row">
-                                               
+
                                                <div class="col">
                                                        <input type="checkbox" id="longlastingsession" name="longlastingsession" tabindex="3" /> <label for="longlastingsession">{% trans "Stay signed in" %}</label><br />
                                                        <small class="inbl">{% trans "(Do not check on public computers)" %}</small>
index 619963539c48d408c2ba8ccdf6d538105e8d6afe..c7e2f66ea51e9e70e3b7e247ea1d4d28904a247e 100644 (file)
@@ -1,3 +1,3 @@
         <script type="text/javascript">
           top["bookmarklet-url@wallabag.org"]=""+"<!DOCTYPE html>"+"<html>"+"<head>"+"<title>bag it!</title>"+'<link rel="icon" href="{{poche_url}}tpl/img/favicon.ico" />'+"</head>"+"<body>"+"<script>"+"window.onload=function(){"+"window.setTimeout(function(){"+"history.back();"+"},250);"+"};"+"</scr"+"ipt>"+"</body>"+"</html>"
-        </script>
\ No newline at end of file
+        </script>
index 213a4acad4b0fc7c4a2383102ca32d80fdf6d84b..25539f6b6bed42cef2765c4a68cc91720a45b1f1 100644 (file)
@@ -1,4 +1,4 @@
         <footer class="w600p center mt3 mb3 smaller txtright">
             <p>{% trans "powered by" %} <a href="http://wallabag.org">wallabag</a></p>
             {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your wallabag version:" %}{{constant('WALLABAG')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %}
-        </footer>
\ No newline at end of file
+        </footer>
index c59b7a15486e302a5db92655b722d7b303002f6e..63a2d3e233ad89e3213dbbd7dcda7d0cf33a2622 100755 (executable)
@@ -2,7 +2,7 @@
 <!--
   $(document).ready(function() {
        $("body").css("cursor", "wait");
-       
+
     setTimeout(function(){
       window.location = './?import';
     }, {{ import.delay }} );
index eedf84f105e0d3764d615192d0f2c7e07ce57165..83fa37172dbcc46f4bb8be9fa9c10d633506089f 100644 (file)
@@ -11,4 +11,3 @@
             </ul>
             {% include '_pocheit-form.twig' %}
             {% include '_search-form.twig' %}
-
index 679aa09811b53046d93bc9615f77121200fa4fd7..b84814949a49cb10edb6d769534fe1cd5be2ca2a 100644 (file)
@@ -1 +1 @@
-                {{ messages | raw }}
\ No newline at end of file
+                {{ messages | raw }}
index 0cf6097a5964f559bfc2ed76cbd2c60bee7ec570..70f973569050353408d49d78f76f2b6e94691c9c 100755 (executable)
@@ -1,4 +1,4 @@
-<div id="search-form" class="messages info">                   
+<div id="search-form" class="messages info">
 <form method="get" action="index.php">
     <p>
                <input type="hidden" name="view" value="search"></input>
index 50ffd8ef4083004748f780d8dcf390bac324fd65..7ddb19d6528cb6d9f5113590ae719ef440e20ead 100755 (executable)
@@ -70,5 +70,5 @@
 
         <dt>PHPePub</dt>
         <dd><a href="https://github.com/Grandt/PHPePub/">https://github.com/Grandt/PHPePub/</a></dd>
-    </dl> 
+    </dl>
 {% endblock %}
index b7d91937bf69dda69e2ffd4a7b22f2fa4e98944a..6769da74e62f3a4e76503198aff8cf7db8649ab4 100755 (executable)
@@ -45,7 +45,7 @@
               {% trans "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>." %}
             </p>
             {% endif %}
-            
+
             <h2>{% trans "Change your theme" %}</h2>
             <form method="post" action="?updatetheme" name="changethemeform">
                 <fieldset class="w500p inline">
index 4adb95402af726c82db2c425bd6cba33ef588af7..18a98a87609a0f5b8d2301b28552e78b574b8d4e 100644 (file)
@@ -1 +1 @@
-{{ export }}
\ No newline at end of file
+{{ export }}
index dfebc3eacff6abe6538968fd995f3e3011c9eee2..d32395a2472a95d7c7a33dbef8c0618a58e160fa 100644 (file)
@@ -28,4 +28,4 @@
         </div>
 {% include '_footer.twig' %}
     </body>
-</html>
\ No newline at end of file
+</html>
index e5be748e308973fdaf8ee802335413a740a44f56..47359ed1b585b28f0aa61013025fee0b79de844d 100755 (executable)
@@ -15,4 +15,4 @@
 
     {% endfor %}
   </div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index 8f3a26c3d367597482cc3d152ae1c774daca6fb2..154de1e4a41e69c3835ca215ef3394b782d7b17d 100755 (executable)
@@ -42,7 +42,7 @@
         <script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script>
         <script type="text/javascript">
         $(document).ready(function() {
-        
+
                        // toggle read property of current article
                        $('#markAsRead').click(function(){
                                $("body").css("cursor", "wait");
                                            function( data ) {
                                        if ( data == '1' ) {
                                                if ( $('#markAsRead').hasClass("archive-off") ) {
-                                                       $('#markAsRead').removeClass("archive-off");    
+                                                       $('#markAsRead').removeClass("archive-off");
                                                        $('#markAsRead').addClass("archive");
                                                }
                                                else {
-                                                       $('#markAsRead').removeClass("archive");        
+                                                       $('#markAsRead').removeClass("archive");
                                                        $('#markAsRead').addClass("archive-off");
                                                }
                                        }
@@ -64,7 +64,7 @@
                                      });
                                            $("body").css("cursor", "auto");
                                          });
-                                         
+
                                          // toggle favorite property of current article
                        $('#setFav').click(function(){
                                $("body").css("cursor", "wait");
                                            function( data ) {
                                        if ( data == '1' ) {
                                                if ( $('#setFav').hasClass("fav-off") ) {
-                                                       $('#setFav').removeClass("fav-off");    
+                                                       $('#setFav').removeClass("fav-off");
                                                        $('#setFav').addClass("fav");
                                                }
                                                else {
-                                                       $('#setFav').removeClass("fav");        
+                                                       $('#setFav').removeClass("fav");
                                                        $('#setFav').addClass("fav-off");
                                                }
                                        }
@@ -86,8 +86,8 @@
                                      });
                                            $("body").css("cursor", "auto");
                                          });
-        
-                                               // set percent of read on startup       
+
+                                               // set percent of read on startup
                        if ( $(document).height() <= $(window).innerHeight() ) {
                          pp = 100;
                        }
@@ -95,7 +95,7 @@
                                pp = 0;
                        }
                        $('#readLeftPercent').text( pp + '%' );
-                       
+
 
             $(window).scroll(function(e){
                 var scrollTop = $(window).scrollTop();
                 var scrollPercent = (scrollTop) / (docHeight);
                 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
                 savePercent({{ entry.id|e }}, scrollPercentRounded);
-                
+
                 // change percent of read on scroll
                 pp = Math.round(scrollTop * 100 / ( docHeight - $(window).innerHeight() ));
                 $('#readLeftPercent').text( pp + '%' );
index 9c39ea9f8dd9ab3750d62ccea55aecd4bb240bd0..d1aacc47f3d48234493a44091c3dde2d77cc18df 100644 (file)
@@ -23,4 +23,4 @@
         </div>
         {% include "WallabagCoreBundle::_footer.html.twig" %}
     </body>
-</html>
\ No newline at end of file
+</html>
index 1f1753a48e14bb692edacc41ea1ce31b6103d452..f062672c83a5d401f7d105de72c0bed478f481dc 100644 (file)
@@ -30,4 +30,4 @@
     </div>
     {% include "WallabagCoreBundle::_footer.html.twig" %}
     </body>
-</html>
\ No newline at end of file
+</html>
index ac57e27dfbd087873408760ccb15c6cab15b3bf7..5499f4007d411323f37c2af41e3b0a2fa77ac5ba 100644 (file)
@@ -56,4 +56,4 @@ class WsseProvider implements AuthenticationProviderInterface
     {
         return $token instanceof WsseUserToken;
     }
-}
\ No newline at end of file
+}
index b189e22a5590445b8778c887c09d82669940025e..ea6fb9bf2d1201cbac430b28b70b1793fa0e1b09 100644 (file)
@@ -20,4 +20,4 @@ class WsseUserToken extends AbstractToken
     {
         return '';
     }
-}
\ No newline at end of file
+}
index b247478587fd25f8b135edeefa2b6e2bb84a1128..4d4f2145c884ff16d2b2e5108747602aa04ee5ce 100644 (file)
@@ -52,7 +52,6 @@ class WsseListener implements ListenerInterface
             $response = new Response();
             $response->setStatusCode(403);
             $event->setResponse($response);
-
         }
     }
-}
\ No newline at end of file
+}
index 1c6ff0ae851632fd80ef36a5a7c7ac21674806d2..d38b0d76958335df06610061f4ca6191757fa207 100644 (file)
@@ -7,29 +7,30 @@ use Wallabag\CoreBundle\Helper\Url;
 
 final class Extractor
 {
-    public static function extract($url) {
+    public static function extract($url)
+    {
         $pageContent = Extractor::getPageContent(new Url(base64_encode($url)));
         $title = ($pageContent['rss']['channel']['item']['title'] != '') ? $pageContent['rss']['channel']['item']['title'] : _('Untitled');
         $body = $pageContent['rss']['channel']['item']['description'];
 
         $content = new Content();
         $content->setTitle($title);
-        $content->setBody($body);;
+        $content->setBody($body);
 
         return $content;
     }
     /**
      * Get the content for a given URL (by a call to FullTextFeed)
      *
-     * @param Url $url
+     * @param  Url   $url
      * @return mixed
      */
     public static function getPageContent(Url $url)
     {
         // Saving and clearing context
         $REAL = array();
-        foreach( $GLOBALS as $key => $value ) {
-            if( $key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS' ) {
+        foreach ($GLOBALS as $key => $value) {
+            if ($key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS') {
                 $GLOBALS[$key]  = array();
                 $REAL[$key]     = $value;
             }
@@ -37,38 +38,39 @@ final class Extractor
         // Saving and clearing session
         if (isset($_SESSION)) {
             $REAL_SESSION = array();
-            foreach( $_SESSION as $key => $value ) {
+            foreach ($_SESSION as $key => $value) {
                 $REAL_SESSION[$key] = $value;
                 unset($_SESSION[$key]);
             }
         }
 
         // Running code in different context
-        $scope = function() {
-            extract( func_get_arg(1) );
+        $scope = function () {
+            extract(func_get_arg(1));
             $_GET = $_REQUEST = array(
                 "url" => $url->getUrl(),
                 "max" => 5,
                 "links" => "preserve",
                 "exc" => "",
                 "format" => "json",
-                "submit" => "Create Feed"
+                "submit" => "Create Feed",
             );
             ob_start();
             require func_get_arg(0);
             $json = ob_get_contents();
             ob_end_clean();
+
             return $json;
         };
 
         // Silence $scope function to avoid
         // issues with FTRSS when error_reporting is to high
         // FTRSS generates PHP warnings which break output
-        $json = @$scope(__DIR__ . "/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php", array("url" => $url));
+        $json = @$scope(__DIR__."/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php", array("url" => $url));
 
         // Clearing and restoring context
         foreach ($GLOBALS as $key => $value) {
-            if($key != "GLOBALS" && $key != "_SESSION" ) {
+            if ($key != "GLOBALS" && $key != "_SESSION") {
                 unset($GLOBALS[$key]);
             }
         }
@@ -78,15 +80,15 @@ final class Extractor
 
         // Clearing and restoring session
         if (isset($REAL_SESSION)) {
-            foreach($_SESSION as $key => $value) {
+            foreach ($_SESSION as $key => $value) {
                 unset($_SESSION[$key]);
             }
 
-            foreach($REAL_SESSION as $key => $value) {
+            foreach ($REAL_SESSION as $key => $value) {
                 $_SESSION[$key] = $value;
             }
         }
 
         return json_decode($json, true);
     }
-}
\ No newline at end of file
+}
index 0b004a307265f1da16340be4faf20a66346425e7..92406865fc2ac682f77b1a0e88e440843b11695e 100644 (file)
@@ -38,4 +38,4 @@ class WallabagExtension extends \Twig_Extension
     {
         return 'wallabag_extension';
     }
-}
\ No newline at end of file
+}