Version 5.0.0 beta 4

This commit is contained in:
Neo committed 2025-12-19 16:57:00 -08:00
1 parent e86153356a
commit 2f24f9de48
276 files changed
+8614 -6044

No files matched your search

@@ -41,9 +41,9 @@ class Photopost extends Software
/**
* Software Name
*
* @return string
* @return string
*/
public static function softwareName()
public static function softwareName(): string
{
/* Child classes must override this method */
return "Photopost (8.x)";
@@ -52,9 +52,9 @@ class Photopost extends Software
/**
* Software Key
*
* @return string
* @return string
*/
public static function softwareKey()
public static function softwareKey(): string
{
/* Child classes must override this method */
return "photopost";
@@ -63,9 +63,9 @@ class Photopost extends Software
/**
* Requires Parent
*
* @return boolean
* @return boolean
*/
public static function requiresParent()
public static function requiresParent(): bool
{
return TRUE;
}
@@ -73,9 +73,9 @@ class Photopost extends Software
/**
* Possible Parent Conversions
*
* @return array
* @return array|null
*/
public static function parents()
public static function parents(): ?array
{
return array( 'core' => array( 'photopost' ) );
}
@@ -83,9 +83,9 @@ class Photopost extends Software
/**
* Content we can convert from this software.
*
* @return array
* @return array|null
*/
public static function canConvert()
public static function canConvert(): ?array
{
return array(
'convertGalleryCategories' => array(
@@ -110,9 +110,9 @@ class Photopost extends Software
/**
* List of conversion methods that require additional information
*
* @return array
* @return array
*/
public static function checkConf()
public static function checkConf(): array
{
return array(
'convertGalleryAlbums',
@@ -123,10 +123,10 @@ class Photopost extends Software
/**
* Get More Information
*
* @param string $method Conversion method
* @return array
* @param string $method Conversion method
* @return array|null
*/
public function getMoreInfo( $method )
public function getMoreInfo( string $method ): ?array
{
$return = array();
switch( $method )
@@ -167,9 +167,9 @@ class Photopost extends Software
/**
* Finish - Adds everything it needs to the queues and clears data store
*
* @return array Messages to display
* @return array Messages to display
*/
public function finish()
public function finish(): array
{
/* Content Rebuilds */
Task::queue( 'convert', 'RebuildGalleryImages', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );
@@ -186,7 +186,7 @@ class Photopost extends Software
*
* @return void
*/
public function convertGalleryCategories()
public function convertGalleryCategories() : void
{
$libraryClass = $this->getLibrary();
@@ -212,7 +212,7 @@ class Photopost extends Software
*
* @return void
*/
public function convertGalleryAlbums()
public function convertGalleryAlbums() : void
{
$libraryClass = $this->getLibrary();
@@ -246,13 +246,13 @@ class Photopost extends Software
*
* @return void
*/
public function convertGalleryImages()
public function convertGalleryImages() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'id' );
foreach( $this->fetch( 'photos', 'id' ) AS $row )
foreach( $this->fetch( 'photos' ) AS $row )
{
$info = array(
'image_id' => $row['id'],
@@ -286,13 +286,13 @@ class Photopost extends Software
*
* @return void
*/
public function convertGalleryComments()
public function convertGalleryComments() : void
{
$libraryClass = $this->getLibrary();
$libraryClass::setKey( 'id' );
foreach( $this->fetch( 'comments', 'id' ) AS $row )
foreach( $this->fetch( 'comments' ) AS $row )
{
$libraryClass->convertGalleryComment( array(
'comment_id' => $row['id'],
@@ -312,9 +312,9 @@ class Photopost extends Software
/**
* Check if we can redirect the legacy URLs from this software to the new locations
*
* @return NULL|Url
* @return Url|NULL
*/
public function checkRedirects()
public function checkRedirects(): ?Url
{
$url = Request::i()->url();
@@ -323,7 +323,7 @@ class Photopost extends Software
if( !$id = Request::i()->cat )
{
preg_match( '#cat/([0-9]+)#', $url->data[ Url::COMPONENT_PATH ], $matches );
$id = isset( $matches[1] ) ? $matches[1] : NULL;
$id = $matches[1] ?? NULL;
}
try
@@ -347,7 +347,7 @@ class Photopost extends Software
if( !$id = Request::i()->photo )
{
preg_match( '#photo/([0-9]+)#', $url->data[ Url::COMPONENT_PATH ], $matches );
$id = isset( $matches[1] ) ? $matches[1] : NULL;
$id = $matches[1] ?? NULL;
}
try