checkstyle by php-cs-fixer

This commit is contained in:
mhor 2014-08-08 23:50:33 +02:00
commit ac767875a6
9 changed files with 22 additions and 30 deletions

View file

@ -12,8 +12,6 @@
namespace FFMpeg; namespace FFMpeg;
use Doctrine\Common\Cache\ArrayCache; use Doctrine\Common\Cache\ArrayCache;
use FFMpeg\FFMpeg;
use FFMpeg\FFProbe;
use Silex\Application; use Silex\Application;
use Silex\ServiceProviderInterface; use Silex\ServiceProviderInterface;

View file

@ -3,7 +3,6 @@
namespace FFMpeg\Filters\Audio; namespace FFMpeg\Filters\Audio;
use FFMpeg\Media\Audio; use FFMpeg\Media\Audio;
use FFMpeg\Filters\Audio\AudioResamplableFilter;
class AudioFilters class AudioFilters
{ {

View file

@ -93,15 +93,15 @@ abstract class DefaultAudio extends EventEmitter implements AudioInterface, Prog
return $this; return $this;
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getAudioChannels() public function getAudioChannels()
{ {
return $this->audioChannels; return $this->audioChannels;
} }
/** /**
* Sets the channels value. * Sets the channels value.
* *
* @param integer $channels * @param integer $channels

View file

@ -14,7 +14,6 @@ namespace FFMpeg\Media;
use FFMpeg\Driver\FFMpegDriver; use FFMpeg\Driver\FFMpegDriver;
use FFMpeg\FFProbe; use FFMpeg\FFProbe;
use FFMpeg\Filters\FiltersCollection; use FFMpeg\Filters\FiltersCollection;
use FFMpeg\Media\MediaTypeInterface;
abstract class AbstractMediaType implements MediaTypeInterface abstract class AbstractMediaType implements MediaTypeInterface
{ {

View file

@ -18,7 +18,6 @@ use FFMpeg\Driver\FFMpegDriver;
use FFMpeg\FFProbe; use FFMpeg\FFProbe;
use FFMpeg\Exception\RuntimeException; use FFMpeg\Exception\RuntimeException;
use FFMpeg\Coordinate\TimeCode; use FFMpeg\Coordinate\TimeCode;
use FFMpeg\Media\Video;
class Frame extends AbstractMediaType class Frame extends AbstractMediaType
{ {

View file

@ -22,7 +22,6 @@ use FFMpeg\Format\FormatInterface;
use FFMpeg\Format\ProgressableInterface; use FFMpeg\Format\ProgressableInterface;
use FFMpeg\Format\AudioInterface; use FFMpeg\Format\AudioInterface;
use FFMpeg\Format\VideoInterface; use FFMpeg\Format\VideoInterface;
use FFMpeg\Media\Frame;
use Neutron\TemporaryFilesystem\Manager as FsManager; use Neutron\TemporaryFilesystem\Manager as FsManager;
class Video extends Audio class Video extends Audio
@ -69,12 +68,12 @@ class Video extends Audio
if ($this->driver->getConfiguration()->has('ffmpeg.threads')) { if ($this->driver->getConfiguration()->has('ffmpeg.threads')) {
$filters->add(new SimpleFilter(array('-threads', $this->driver->getConfiguration()->get('ffmpeg.threads')))); $filters->add(new SimpleFilter(array('-threads', $this->driver->getConfiguration()->get('ffmpeg.threads'))));
} }
if ($format instanceOf VideoInterface) { if ($format instanceof VideoInterface) {
if (null !== $format->getVideoCodec()) { if (null !== $format->getVideoCodec()) {
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec()))); $filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
} }
} }
if ($format instanceOf AudioInterface) { if ($format instanceof AudioInterface) {
if (null !== $format->getAudioCodec()) { if (null !== $format->getAudioCodec()) {
$filters->add(new SimpleFilter(array('-acodec', $format->getAudioCodec()))); $filters->add(new SimpleFilter(array('-acodec', $format->getAudioCodec())));
} }
@ -84,7 +83,7 @@ class Video extends Audio
$commands = array_merge($commands, $filter->apply($this, $format)); $commands = array_merge($commands, $filter->apply($this, $format));
} }
if ($format instanceOf VideoInterface) { if ($format instanceof VideoInterface) {
$commands[] = '-b:v'; $commands[] = '-b:v';
$commands[] = $format->getKiloBitrate() . 'k'; $commands[] = $format->getKiloBitrate() . 'k';
$commands[] = '-refs'; $commands[] = '-refs';
@ -109,15 +108,15 @@ class Video extends Audio
$commands[] = '1'; $commands[] = '1';
} }
if ($format instanceOf AudioInterface) { if ($format instanceof AudioInterface) {
if (null !== $format->getAudioKiloBitrate()) { if (null !== $format->getAudioKiloBitrate()) {
$commands[] = '-b:a'; $commands[] = '-b:a';
$commands[] = $format->getAudioKiloBitrate() . 'k'; $commands[] = $format->getAudioKiloBitrate() . 'k';
} }
if (null !== $format->getAudioChannels()) { if (null !== $format->getAudioChannels()) {
$commands[] = '-ac'; $commands[] = '-ac';
$commands[] = $format->getAudioChannels(); $commands[] = $format->getAudioChannels();
} }
} }
$fs = FsManager::create(); $fs = FsManager::create();

View file

@ -3,11 +3,10 @@
namespace FFMpeg\Tests; namespace FFMpeg\Tests;
use FFMpeg\FFMpeg; use FFMpeg\FFMpeg;
use FFMpeg\Tests\TestCase;
use FFMpeg\FFProbe\DataMapping\StreamCollection; use FFMpeg\FFProbe\DataMapping\StreamCollection;
use FFMpeg\FFProbe\DataMapping\Stream; use FFMpeg\FFProbe\DataMapping\Stream;
class FFMpegTest Extends TestCase class FFMpegTest extends TestCase
{ {
/** /**
* @expectedException \FFMpeg\Exception\RuntimeException * @expectedException \FFMpeg\Exception\RuntimeException

View file

@ -2,7 +2,6 @@
namespace FFMpeg\Tests; namespace FFMpeg\Tests;
use FFMpeg\Tests\TestCase;
use FFMpeg\FFProbe; use FFMpeg\FFProbe;
use Symfony\Component\Process\ExecutableFinder; use Symfony\Component\Process\ExecutableFinder;
use Alchemy\BinaryDriver\ConfigurationInterface; use Alchemy\BinaryDriver\ConfigurationInterface;

View file

@ -198,7 +198,7 @@ class AudioTest extends AbstractStreamableTestCase
$audioFormat->expects($this->any()) $audioFormat->expects($this->any())
->method('getAudioKiloBitrate') ->method('getAudioKiloBitrate')
->will($this->returnValue(664)); ->will($this->returnValue(664));
$audioFormat->expects($this->any()) $audioFormat->expects($this->any())
->method('getAudioChannels') ->method('getAudioChannels')
->will($this->returnValue(5)); ->will($this->returnValue(5));
$audioFormat->expects($this->any()) $audioFormat->expects($this->any())
@ -244,21 +244,21 @@ class AudioTest extends AbstractStreamableTestCase
'-y', '-i', __FILE__, '-y', '-i', __FILE__,
'-acodec', 'patati-patata-audio', '-acodec', 'patati-patata-audio',
'-b:a', '664k', '-b:a', '664k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), null, $audioFormat), ), null, $audioFormat),
array(false, array( array(false, array(
'-y', '-i', __FILE__, '-y', '-i', __FILE__,
'extra', 'param', 'extra', 'param',
'-b:a', '665k', '-b:a', '665k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), null, $formatExtra), ), null, $formatExtra),
array(true, array( array(true, array(
'-y', '-i', __FILE__, '-y', '-i', __FILE__,
'-threads', 24, '-threads', 24,
'-b:a', '663k', '-b:a', '663k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), null, $format), ), null, $format),
array(true, array( array(true, array(
@ -266,20 +266,20 @@ class AudioTest extends AbstractStreamableTestCase
'extra', 'param', 'extra', 'param',
'-threads', 24, '-threads', 24,
'-b:a', '665k', '-b:a', '665k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), null, $formatExtra), ), null, $formatExtra),
array(false, array( array(false, array(
'-y', '-i', __FILE__, '-y', '-i', __FILE__,
'-b:a', '666k', '-b:a', '666k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), $listeners, $progressableFormat), ), $listeners, $progressableFormat),
array(true, array( array(true, array(
'-y', '-i', __FILE__, '-y', '-i', __FILE__,
'-threads', 24, '-threads', 24,
'-b:a', '666k', '-b:a', '666k',
'-ac', '5', '-ac', '5',
'/target/file', '/target/file',
), $listeners, $progressableFormat), ), $listeners, $progressableFormat),
); );