Skip to content
Browse files

phpcs

  • Loading branch information...
1 parent cebb7c7 commit a6a73cb882b6290375f88d4ac4d8080c81c55d6d @Gemorroj committed Nov 11, 2012
Showing with 211 additions and 0 deletions.
  1. +20 −0 MP3/Id3/Best.php
  2. +99 −0 MP3/Id3/Id.php
  3. +92 −0 MP3/Id3/Meta.php
View
20 MP3/Id3/Best.php
@@ -42,22 +42,36 @@ public function __construct()
}
+ /**
+ * @return MP3_Id3_Idv1
+ */
public function getIdv1()
{
return $this->idv1;
}
+ /**
+ * @return MP3_Id3_Idv2
+ */
public function getIdv2()
{
return $this->idv2;
}
+ /**
+ * @return MP3_Id3_Meta
+ */
public function getMeta()
{
return $this->meta;
}
+ /**
+ * @param string $file
+ *
+ * @return MP3_Id3_Best
+ */
public function read($file)
{
$this->idv1->read($file);
@@ -69,6 +83,11 @@ public function read($file)
return $this;
}
+ /**
+ * @param string $file
+ *
+ * @return MP3_Id3_Best
+ */
public function write($file)
{
$this->writeTags();
@@ -100,6 +119,7 @@ private function readMeta()
$this->meta->setLayer($idv1->layer);
$this->meta->setBitrate($idv1->bitrate);
$this->meta->setLength($idv1->lengths);
+ $this->meta->setQuality($idv1->quality);
return $this;
}
View
99 MP3/Id3/Id.php
@@ -30,6 +30,7 @@
abstract public function write($file);
+
abstract public function read($file);
@@ -41,66 +42,111 @@ public function getIterator()
return new ArrayIterator(get_object_vars($this));
}
+ /**
+ * @param string $albumTitle
+ *
+ * @return MP3_Id3_Id
+ */
public function setAlbumTitle($albumTitle)
{
$this->albumTitle = $albumTitle;
return $this;
}
+ /**
+ * @return string
+ */
public function getAlbumTitle()
{
return $this->albumTitle;
}
+ /**
+ * @param string $artistName
+ *
+ * @return MP3_Id3_Id
+ */
public function setArtistName($artistName)
{
$this->artistName = $artistName;
return $this;
}
+ /**
+ * @return string
+ */
public function getArtistName()
{
return $this->artistName;
}
+ /**
+ * @param string $comment
+ *
+ * @return MP3_Id3_Id
+ */
public function setComment($comment)
{
$this->comment = $comment;
return $this;
}
+ /**
+ * @return string
+ */
public function getComment()
{
return $this->comment;
}
+ /**
+ * @param string $composer
+ *
+ * @return MP3_Id3_Id
+ */
public function setComposer($composer)
{
$this->composer = $composer;
return $this;
}
+ /**
+ * @return string
+ */
public function getComposer()
{
return $this->composer;
}
+ /**
+ * @param string $copyright
+ *
+ * @return MP3_Id3_Id
+ */
public function setCopyright($copyright)
{
$this->copyright = $copyright;
return $this;
}
+ /**
+ * @return string
+ */
public function getCopyright()
{
return $this->copyright;
}
+ /**
+ * @param string $genreId
+ *
+ * @return MP3_Id3_Id
+ */
public function setGenreId($genreId)
{
$genre = new MP3_Id3_Genre();
@@ -110,6 +156,11 @@ public function setGenreId($genreId)
return $this;
}
+ /**
+ * @param MP3_Id3_Genre $genre
+ *
+ * @return MP3_Id3_Id
+ */
public function setGenre(MP3_Id3_Genre $genre = null)
{
$this->genre = $genre;
@@ -125,73 +176,121 @@ public function getGenre()
return (null === $this->genre ? new MP3_Id3_Genre() : $this->genre);
}
+ /**
+ * @param string $trackTitle
+ *
+ * @return MP3_Id3_Id
+ */
public function setTrackTitle($trackTitle)
{
$this->trackTitle = $trackTitle;
return $this;
}
+ /**
+ * @return string
+ */
public function getTrackTitle()
{
return $this->trackTitle;
}
+ /**
+ * @param string $trackNumber
+ *
+ * @return MP3_Id3_Id
+ */
public function setTrackNumber($trackNumber)
{
$this->trackNumber = $trackNumber;
return $this;
}
+ /**
+ * @return string
+ */
public function getTrackNumber()
{
return $this->trackNumber;
}
+ /**
+ * @param string $url
+ *
+ * @return MP3_Id3_Id
+ */
public function setUrl($url)
{
$this->url = $url;
return $this;
}
+ /**
+ * @return string
+ */
public function getUrl()
{
return $this->url;
}
+ /**
+ * @param string $year
+ *
+ * @return MP3_Id3_Id
+ */
public function setYear($year)
{
$this->year = $year;
return $this;
}
+ /**
+ * @return string
+ */
public function getYear()
{
return $this->year;
}
+ /**
+ * @param string $encodedBy
+ *
+ * @return MP3_Id3_Id
+ */
public function setEncodedBy($encodedBy)
{
$this->encodedBy = $encodedBy;
return $this;
}
+ /**
+ * @return string
+ */
public function getEncodedBy()
{
return $this->encodedBy;
}
+ /**
+ * @param string $albumArtist
+ *
+ * @return MP3_Id3_Id
+ */
public function setAlbumArtist($albumArtist)
{
$this->albumArtist = $albumArtist;
return $this;
}
+ /**
+ * @return string
+ */
public function getAlbumArtist()
{
return $this->albumArtist;
View
92 MP3/Id3/Meta.php
@@ -21,94 +21,186 @@ class MP3_Id3_Meta
protected $layer;
protected $bitrate;
protected $length;
+ protected $quality;
+ /**
+ * @param int $bitrate
+ *
+ * @return MP3_Id3_Meta
+ */
public function setBitrate($bitrate)
{
$this->bitrate = $bitrate;
return $this;
}
+ /**
+ * @return int
+ */
public function getBitrate()
{
return $this->bitrate;
}
+ /**
+ * @param string $encodingType
+ *
+ * @return MP3_Id3_Meta
+ */
public function setEncodingType($encodingType)
{
$this->encodingType = $encodingType;
+
return $this;
}
+ /**
+ * @return string
+ */
public function getEncodingType()
{
return $this->encodingType;
}
+ /**
+ * @param int $filesize
+ *
+ * @return MP3_Id3_Meta
+ */
public function setFilesize($filesize)
{
$this->filesize = $filesize;
+
return $this;
}
+ /**
+ * @return int
+ */
public function getFilesize()
{
return $this->filesize;
}
+ /**
+ * @param int $frequency
+ *
+ * @return MP3_Id3_Meta
+ */
public function setFrequency($frequency)
{
$this->frequency = $frequency;
+
return $this;
}
+ /**
+ * @return int
+ */
public function getFrequency()
{
return $this->frequency;
}
+ /**
+ * @param int $layer
+ *
+ * @return MP3_Id3_Meta
+ */
public function setLayer($layer)
{
$this->layer = $layer;
+
return $this;
}
+ /**
+ * @return int
+ */
public function getLayer()
{
return $this->layer;
}
+ /**
+ * @param int $length
+ *
+ * @return MP3_Id3_Meta
+ */
public function setLength($length)
{
$this->length = $length;
+
return $this;
}
+ /**
+ * @return int
+ */
public function getLength()
{
return $this->length;
}
+ /**
+ * @param string $mode
+ *
+ * @return MP3_Id3_Meta
+ */
public function setMode($mode)
{
$this->mode = $mode;
+
return $this;
}
+ /**
+ * @return string
+ */
public function getMode()
{
return $this->mode;
}
+ /**
+ * @param float $mpegVersion
+ *
+ * @return MP3_Id3_Meta
+ */
public function setMpegVersion($mpegVersion)
{
$this->mpegVersion = $mpegVersion;
+
return $this;
}
+ /**
+ * @return float
+ */
public function getMpegVersion()
{
return $this->mpegVersion;
}
+
+ /**
+ * @param int $quality
+ *
+ * @return MP3_Id3_Meta
+ */
+ public function setQuality($quality)
+ {
+ $this->quality = $quality;
+
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function getQuality()
+ {
+ return $this->quality;
+ }
}

0 comments on commit a6a73cb

Please sign in to comment.
Something went wrong with that request. Please try again.