Update return type declarations on adult postprocessing classes

This commit is contained in:
DariusIII
2019-03-20 14:37:43 +01:00
parent c9da97d548
commit ed30d3e106
5 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class ADE extends AdultMovies
{
$this->_response = getRawHtml(self::ADE.$this->_trailers.$this->_directUrl);
$this->_html->loadHtml($this->_response);
if (preg_match("/(\"|')(?P<swf>[^\"']+.swf)(\"|')/i", $this->_response, $matches)) {
if (preg_match("/([\"|'])(?P<swf>[^\"']+.swf)([\"|'])/i", $this->_response, $matches)) {
$this->_res['trailers']['url'] = self::ADE.trim(trim($matches['swf']), '"');
if (preg_match(
'#(?:streamID:\s\")(?P<streamid>[0-9A-Z]+)(?:\")#',
+5 -5
View File
@@ -89,7 +89,7 @@ class ADM extends AdultMovies
*
* @return array
*/
protected function synopsis()
protected function synopsis(): array
{
$this->_res['synopsis'] = 'N/A';
foreach ($this->_html->find('h3') as $heading) {
@@ -109,7 +109,7 @@ class ADM extends AdultMovies
*
* @return array
*/
protected function productInfo($extras = false)
protected function productInfo($extras = false): array
{
foreach ($this->_html->find('ul.list-unstyled li') as $li) {
$category = explode(':', $li->plaintext);
@@ -132,7 +132,7 @@ class ADM extends AdultMovies
* Gets the cast members.
* @return array
*/
protected function cast()
protected function cast(): array
{
$cast = [];
foreach ($this->_html->find('h3') as $heading) {
@@ -156,7 +156,7 @@ class ADM extends AdultMovies
* Gets categories.
* @return array
*/
protected function genres()
protected function genres(): array
{
$genres = [];
foreach ($this->_html->find('ul.list-unstyled') as $li) {
@@ -179,7 +179,7 @@ class ADM extends AdultMovies
*
* @return bool - true if search = 100%
*/
public function processSite($movie)
public function processSite($movie): bool
{
$result = false;
if (! empty($movie)) {
+5 -5
View File
@@ -82,7 +82,7 @@ class AEBN extends AdultMovies
*
* @return array
*/
protected function covers()
protected function covers(): array
{
$ret = $this->_html->find('div#md-boxCover, img[itemprop=thumbnailUrl]', 1);
if ($ret !== false) {
@@ -102,7 +102,7 @@ class AEBN extends AdultMovies
*
* @return array
*/
protected function genres()
protected function genres(): array
{
if ($ret = $this->_html->findOne('div.md-detailsCategories')) {
foreach ($ret->find('a[itemprop=genre]') as $genre) {
@@ -121,7 +121,7 @@ class AEBN extends AdultMovies
*
* @return array
*/
protected function cast()
protected function cast(): array
{
$this->_res = false;
$ret = $this->_html->findOne('div.starsFull');
@@ -150,7 +150,7 @@ class AEBN extends AdultMovies
*
* @return array
*/
protected function productInfo($extras = false)
protected function productInfo($extras = false): array
{
if ($ret = $this->_html->find('div#md-detailsLeft', 0)) {
foreach ($ret->find('div') as $div) {
@@ -178,7 +178,7 @@ class AEBN extends AdultMovies
*
* @return array
*/
protected function synopsis()
protected function synopsis(): array
{
if ($ret = $this->_html->findOne('span[itemprop=about]')) {
if ($ret === null) {
+2 -2
View File
@@ -145,7 +145,7 @@ class Hotmovies extends AdultMovies
*
* @return array
*/
protected function cast()
protected function cast(): array
{
$cast = [];
if ($this->_html->find('.stars bottom_margin')) {
@@ -165,7 +165,7 @@ class Hotmovies extends AdultMovies
*
* @return array
*/
protected function genres()
protected function genres(): array
{
$genres = [];
if ($ret = $this->_html->findOne('div.categories')) {
+1
View File
@@ -1,4 +1,5 @@
2019-03-20 DariusIII
* Chg: Update return type declarations on adult postprocessing classes
* Chg: Update dariusiii/rarinfo (v2.7.4 => v2.7.4.1)
* Chg: Update dariusiii/rarinfo (v2.7.3 => v2.7.4)
* Chg: Update PPA class, simplify unrar location setting load