Completed
Push — master ( d4bf62...6f68dd )
by Florian
06:56
created
Parser/Types/Mp3Parser.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -75,6 +75,9 @@
 block discarded – undo
75 75
 		return $information;
76 76
 	}
77 77
 	
78
+	/**
79
+	 * @param string $property
80
+	 */
78 81
 	protected function getAttribute($audio, $property){
79 82
 		if(array_key_exists($property, $audio['tags']['id3v2'])){
80 83
 			$values = $audio['tags']['id3v2'][$property];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		
40 40
 		$audio = $getId3->analyze($file->getRealPath());
41 41
 		if(isset($audio['error'])){
42
-			throw new \RuntimeException('Error at reading audio properties with GetId3 : ' . $file->getRealPath()." ". print_r($audio['error'], true));
42
+			throw new \RuntimeException('Error at reading audio properties with GetId3 : '.$file->getRealPath()." ".print_r($audio['error'], true));
43 43
 		}
44 44
 		
45 45
 		//No id3v2 tag found
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		if(array_key_exists($property, $audio['tags']['id3v2'])){
80 80
 			$values = $audio['tags']['id3v2'][$property];
81 81
 			if(is_array($values)){
82
-				if(count($values)>0){
82
+				if(count($values) > 0){
83 83
 					return $values[0];
84 84
 				}
85 85
 			}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 			$setnumber = explode("/", $partOfASet);
60 60
 			$information->setSetNumber($setnumber[0]);
61 61
 			$information->setTotalSetNumbers($setnumber[1]);
62
-		}else{
62
+		} else{
63 63
 			$information->setSetNumber($partOfASet);
64 64
 		}
65 65
 		
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			$trackNumber = explode("/", $trackNumberArr);
69 69
 			$information->setTrackNumber($trackNumber[0]);
70 70
 			$information->setTotalTrackNumbers($trackNumber[1]);
71
-		}else{
71
+		} else{
72 72
 			$information->setTrackNumber($trackNumberArr);
73 73
 		}
74 74
 		
Please login to merge, or discard this patch.
Parser/ParserChain.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 use Symfony\Component\HttpFoundation\File\File;
16 16
 use StingerSoft\MediaParsingBundle\Parser\Information\FileInformation;
17 17
 
18
-class ParserChain implements ParserChainInterface{
18
+class ParserChain implements ParserChainInterface {
19 19
 	
20 20
 	/**
21 21
 	 * 
Please login to merge, or discard this patch.
Parser/MediaParserInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
 	 * Checks whether this parser can handle the file or not
31 31
 	 * @param File  $file
32 32
 	 * @return boolean if this parses is able to handle the given file
33
-	*/
33
+	 */
34 34
 	public function canHandle(File $file);
35 35
 }
Please login to merge, or discard this patch.
Parser/Information/FileInformation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
 
14 14
 use StingerSoft\MediaParsingBundle\Parser\Information\AbstractMediaInformation;
15 15
 
16
-class FileInformation extends AbstractMediaInformation{
16
+class FileInformation extends AbstractMediaInformation {
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
Parser/Information/SongInformation.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,46 +34,46 @@
 block discarded – undo
34 34
 	
35 35
 
36 36
 
37
-	public function getArtist() {
37
+	public function getArtist(){
38 38
 		return $this->artist;
39 39
 	}
40
-	public function setArtist($artist) {
40
+	public function setArtist($artist){
41 41
 		$this->artist = $artist;
42 42
 		return $this;
43 43
 	}
44 44
 
45
-	public function getAlbum() {
45
+	public function getAlbum(){
46 46
 		return $this->album;
47 47
 	}
48
-	public function setAlbum($album) {
48
+	public function setAlbum($album){
49 49
 		$this->album = $album;
50 50
 		return $this;
51 51
 	}
52
-	public function getTrackNumber() {
52
+	public function getTrackNumber(){
53 53
 		return $this->trackNumber;
54 54
 	}
55
-	public function setTrackNumber($trackNumber) {
55
+	public function setTrackNumber($trackNumber){
56 56
 		$this->trackNumber = $trackNumber;
57 57
 		return $this;
58 58
 	}
59
-	public function getTotalTrackNumbers() {
59
+	public function getTotalTrackNumbers(){
60 60
 		return $this->totalTrackNumbers;
61 61
 	}
62
-	public function setTotalTrackNumbers($totalTrackNumbers) {
62
+	public function setTotalTrackNumbers($totalTrackNumbers){
63 63
 		$this->totalTrackNumbers = $totalTrackNumbers;
64 64
 		return $this;
65 65
 	}
66
-	public function getSetNumber() {
66
+	public function getSetNumber(){
67 67
 		return $this->setNumber;
68 68
 	}
69
-	public function setSetNumber($setNumber) {
69
+	public function setSetNumber($setNumber){
70 70
 		$this->setNumber = $setNumber;
71 71
 		return $this;
72 72
 	}
73
-	public function getTotalSetNumbers() {
73
+	public function getTotalSetNumbers(){
74 74
 		return $this->totalSetNumbers;
75 75
 	}
76
-	public function setTotalSetNumbers($totalSetNumbers) {
76
+	public function setTotalSetNumbers($totalSetNumbers){
77 77
 		$this->totalSetNumbers = $totalSetNumbers;
78 78
 		return $this;
79 79
 	}
Please login to merge, or discard this patch.
Parser/ParserCompilerPass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @see Symfony\Component\DependencyInjection\Compiler.CompilerPassInterface::process()
23 23
 	 */
24 24
 	public function process(ContainerBuilder $container){
25
-		if (!$container->hasDefinition(ParserChainInterface::SERVICE_ID)) {
25
+		if(!$container->hasDefinition(ParserChainInterface::SERVICE_ID)){
26 26
 			return;
27 27
 		}
28 28
 		
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 
31 31
 		$taggedServices = $container->findTaggedServiceIds(MediaParserInterface::SERVICE_TAG);
32 32
 		
33
-		foreach ($taggedServices as $id => $tagAttributes) {
34
-			foreach ($tagAttributes as $attributes) {
33
+		foreach($taggedServices as $id => $tagAttributes){
34
+			foreach($tagAttributes as $attributes){
35 35
 				$definition->addMethodCall(
36 36
 						'addParser',
37 37
 						array(new Reference($id))
Please login to merge, or discard this patch.
Tests/TestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 			'kernel.bundles'     => array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\YamlBundle'),
26 26
 			'kernel.cache_dir'   => sys_get_temp_dir(),
27 27
 			'kernel.environment' => 'test',
28
-			'kernel.root_dir'    => __DIR__ . '/../../../../', // src dir
28
+			'kernel.root_dir'    => __DIR__.'/../../../../', // src dir
29 29
 		)));
30 30
 		$extension = new StingerSoftMediaParsingExtension();
31 31
 		$container->registerExtension($extension);
Please login to merge, or discard this patch.