mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
fixed CS
This commit is contained in:
@@ -19,7 +19,7 @@ class BlobController implements ControllerProviderInterface
|
||||
$breadcrumbs = $app['util.view']->getBreadcrumbs($file);
|
||||
$fileType = $app['util.repository']->getFileType($file);
|
||||
|
||||
if ('image' !== $fileType && $app['util.repository']->isBinary($fileType)) {
|
||||
if ($fileType !== 'image' && $app['util.repository']->isBinary($fileType)) {
|
||||
return $app->redirect($app['url_generator']->generate('blob_raw', array(
|
||||
'repo' => $repo,
|
||||
'branch' => $branch,
|
||||
|
||||
@@ -143,7 +143,7 @@ class Repository
|
||||
*/
|
||||
public function isBinary($file, $unknownAsBin = false)
|
||||
{
|
||||
if (false !== ($pos = strrpos($file, '.'))) {
|
||||
if (($pos = strrpos($file, '.')) !== false) {
|
||||
$fileType = substr($file, $pos + 1);
|
||||
} elseif ($unknownAsBin) {
|
||||
return true;
|
||||
@@ -157,7 +157,7 @@ class Repository
|
||||
|
||||
if (!empty($this->app['binary_filetypes'])) {
|
||||
if (array_key_exists($fileType, $this->app['binary_filetypes'])) {
|
||||
return ('true' == $this->app['binary_filetypes'][$fileType]);
|
||||
return $this->app['binary_filetypes'][$fileType];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user