mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
Fix CS
This commit is contained in:
@@ -13,12 +13,6 @@ namespace Alchemy\Phrasea\Command;
|
|||||||
|
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Alchemy\Phrasea\Setup\Requirements\BinariesRequirements;
|
|
||||||
use Alchemy\Phrasea\Setup\Requirements\FilesystemRequirements;
|
|
||||||
use Alchemy\Phrasea\Setup\Requirements\LocalesRequirements;
|
|
||||||
use Alchemy\Phrasea\Setup\Requirements\PhraseaRequirements;
|
|
||||||
use Alchemy\Phrasea\Setup\Requirements\PhpRequirements;
|
|
||||||
use Alchemy\Phrasea\Setup\Requirements\SystemRequirements;
|
|
||||||
use Alchemy\Phrasea\Command\Setup\CheckEnvironment;
|
use Alchemy\Phrasea\Command\Setup\CheckEnvironment;
|
||||||
|
|
||||||
class CheckConfig extends CheckEnvironment
|
class CheckConfig extends CheckEnvironment
|
||||||
|
@@ -20,7 +20,6 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
|||||||
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
|
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||||
|
|
||||||
class ApiExceptionHandlerSubscriber implements EventSubscriberInterface
|
class ApiExceptionHandlerSubscriber implements EventSubscriberInterface
|
||||||
|
@@ -59,7 +59,7 @@ class PluginServiceProvider implements ServiceProviderInterface
|
|||||||
$app['plugins.composer-installer'] = $app->share(function (Application $app) {
|
$app['plugins.composer-installer'] = $app->share(function (Application $app) {
|
||||||
$binaries = $app['phraseanet.configuration']['binaries'];
|
$binaries = $app['phraseanet.configuration']['binaries'];
|
||||||
$phpBinary = isset($binaries['php_binary']) ? $binaries['php_binary'] : null;
|
$phpBinary = isset($binaries['php_binary']) ? $binaries['php_binary'] : null;
|
||||||
|
|
||||||
if (!is_executable($phpBinary)) {
|
if (!is_executable($phpBinary)) {
|
||||||
$finder = new ExecutableFinder();
|
$finder = new ExecutableFinder();
|
||||||
$phpBinary = $finder->find('php');
|
$phpBinary = $finder->find('php');
|
||||||
|
@@ -21,21 +21,21 @@ interface DeliverDataInterface
|
|||||||
/**
|
/**
|
||||||
* Returns a HTTP Response ready to deliver a binary file
|
* Returns a HTTP Response ready to deliver a binary file
|
||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @param string $disposition
|
* @param string $disposition
|
||||||
* @param string|null $mimetype
|
* @param string|null $mimetype
|
||||||
* @param integer $cacheDuration
|
* @param integer $cacheDuration
|
||||||
*/
|
*/
|
||||||
public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = 3600);
|
public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = 3600);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a HTTP Response ready to deliver data
|
* Return a HTTP Response ready to deliver data
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
* @param string $mimeType
|
* @param string $mimeType
|
||||||
* @param string $disposition
|
* @param string $disposition
|
||||||
* @param integer $cacheDuration
|
* @param integer $cacheDuration
|
||||||
*/
|
*/
|
||||||
public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = 3600);
|
public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = 3600);
|
||||||
|
@@ -32,7 +32,7 @@ class ServeFileResponseFactory implements DeliverDataInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Application $app
|
* @param Application $app
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public static function create(Application $app)
|
public static function create(Application $app)
|
||||||
|
@@ -32,7 +32,7 @@ class XsendfileMapping
|
|||||||
{
|
{
|
||||||
$final = array();
|
$final = array();
|
||||||
|
|
||||||
foreach($this->mapping as $entry) {
|
foreach ($this->mapping as $entry) {
|
||||||
if (!is_dir($entry['directory']) || '' === $entry['mount-point']) {
|
if (!is_dir($entry['directory']) || '' === $entry['mount-point']) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ class XsendfileMapping
|
|||||||
|
|
||||||
private function validate(array $mapping)
|
private function validate(array $mapping)
|
||||||
{
|
{
|
||||||
foreach($mapping as $entry) {
|
foreach ($mapping as $entry) {
|
||||||
if (!is_array($entry)) {
|
if (!is_array($entry)) {
|
||||||
throw new InvalidArgumentException('XSendFile mapping entry must be an array');
|
throw new InvalidArgumentException('XSendFile mapping entry must be an array');
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
use Symfony\Component\Filesystem\Filesystem;
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -19,7 +19,7 @@ class ApcCacheTest extends \PHPUnit_Framework_TestCase
|
|||||||
if (!ini_get('apc.enable_cli')) {
|
if (!ini_get('apc.enable_cli')) {
|
||||||
$this->markTestSkipped('Apc is not loaded in CLI');
|
$this->markTestSkipped('Apc is not loaded in CLI');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->object = new ApcCache;
|
$this->object = new ApcCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user