diff --git a/lib/classes/caption/Field/Value.php b/lib/classes/caption/Field/Value.php index 70ded50e33..0e10648c66 100644 --- a/lib/classes/caption/Field/Value.php +++ b/lib/classes/caption/Field/Value.php @@ -373,14 +373,12 @@ class caption_Field_Value implements cache_cacheableInterface $note += ($node->getAttribute("w") == $term_noacc) ? 2 : 0; if($context_noacc != "") $note += ($node->getAttribute("k") == $context_noacc) ? 1 : 0; - if($note > $bestnote) - { + if ($note > $bestnote) { $bestnote = $note; $bestnode = $node; } } - if($bestnode) - { + if ($bestnode) { list($term, $context) = $this->splitTermAndContext(str_replace(array("[[em]]", "[[/em]]"), array("", ""), $value)); $qjs = $term . ($context ? '['.$context.']' : ''); diff --git a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php index bae1e5bc0c..6e0bdf093d 100644 --- a/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Authentication/AuthenticatorTest.php @@ -2,7 +2,6 @@ namespace Alchemy\Tests\Phrasea\Authentication; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Authentication\Authenticator; use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Model\Entities\Session; diff --git a/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php b/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php index c509e91f72..5df32a2651 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/Checker/AbstractCheckerTest.php @@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\Border\Checker; use Alchemy\Phrasea\Border\Checker\AbstractChecker; use Alchemy\Phrasea\Border\File; -use Alchemy\Phrasea\Application; use Doctrine\ORM\EntityManager; use Symfony\Component\Translation\TranslatorInterface; diff --git a/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php b/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php index da938dedc1..829fdb2120 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/UpgradeDBDatasTest.php @@ -2,7 +2,6 @@ namespace Alchemy\Tests\Phrasea\Command; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Command\UpgradeDBDatas; use Alchemy\Phrasea\Command\Upgrade\Step31; use Alchemy\Phrasea\Command\Upgrade\Step35; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php index 7743b68140..1b543f1627 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SearchEngineTest.php @@ -2,7 +2,6 @@ namespace Alchemy\Tests\Phrasea\Controller\Admin; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine; use Alchemy\Phrasea\SearchEngine\SphinxSearch\SphinxSearchEngine; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/TOUTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/TOUTest.php index 8c9746fb8e..34adb56de6 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/TOUTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/TOUTest.php @@ -2,8 +2,6 @@ namespace Alchemy\Tests\Phrasea\Controller\Prod; -use Alchemy\Phrasea\Application; - class TOUTest extends \PhraseanetAuthenticatedWebTestCase { protected $client; diff --git a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php index 54c6d2a863..776110ff0d 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/RecordsRequestTest.php @@ -3,7 +3,6 @@ namespace Alchemy\Tests\Phrasea\Controller; use Alchemy\Phrasea\Controller\RecordsRequest; -use Alchemy\Phrasea\Application; use Symfony\Component\HttpFoundation\Request; class RecordsRequestTest extends \PhraseanetAuthenticatedTestCase diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php index 08e9e272ba..ff367e3b3d 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/BorderManagerServiceProviderTest.php @@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; use Alchemy\Phrasea\Core\Provider\BorderManagerServiceProvider; use Alchemy\Phrasea\Core\Provider\ConfigurationServiceProvider; -use Silex\Application; use Symfony\Component\Process\ExecutableFinder; use XPDF\XPDFServiceProvider; diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php index 0970ff5c7f..21e1ec411c 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/ConfigurationServiceProviderTest.php @@ -3,7 +3,6 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; use Alchemy\Phrasea\Core\Provider\ConfigurationServiceProvider; -use Silex\Application; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Client; diff --git a/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php b/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php index a650a1d7f6..01d39f9a18 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Provider/TasksServiceProviderTest.php @@ -4,7 +4,6 @@ namespace Alchemy\Tests\Phrasea\Core\Provider; use Alchemy\Phrasea\Core\Provider\TasksServiceProvider; use Alchemy\Tests\Tools\TranslatorMockTrait; -use Silex\Application; class TasksServiceProviderTest extends ServiceProviderTestCase { diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php index 80389d4f89..733f619fe9 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SphinxSearchEngineTest.php @@ -2,7 +2,6 @@ namespace Alchemy\Tests\Phrasea\SearchEngine; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\SearchEngine\SphinxSearch\SphinxSearchEngine; use Alchemy\Tests\Phrasea\SearchEngine\SearchEngineAbstractTest; use Symfony\Component\Process\ExecutableFinder; diff --git a/tests/classes/PhraseanetTestCase.php b/tests/classes/PhraseanetTestCase.php index aa57075744..3254cfda0e 100644 --- a/tests/classes/PhraseanetTestCase.php +++ b/tests/classes/PhraseanetTestCase.php @@ -26,7 +26,6 @@ use Alchemy\Phrasea\Model\Entities\StoryWZ; use Monolog\Logger; use Monolog\Handler\NullHandler; use Silex\WebTestCase; -use Symfony\Component\Finder\Finder; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Client; use Symfony\Component\DomCrawler\Crawler; diff --git a/tests/classes/api/v1/api_v1_TimerTest.php b/tests/classes/api/v1/api_v1_TimerTest.php index 8f9915be41..ae391cef9b 100644 --- a/tests/classes/api/v1/api_v1_TimerTest.php +++ b/tests/classes/api/v1/api_v1_TimerTest.php @@ -1,7 +1,6 @@