Skip to content

Commit

Permalink
Fix docBlocks
Browse files Browse the repository at this point in the history
 And import class + fix break in switch statement
  • Loading branch information
pH-7 committed Jul 9, 2017
1 parent c3387d7 commit d4a4369
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions _protected/framework/Mvc/Model/Engine/Util/Various.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
*/

namespace PH7\Framework\Mvc\Model\Engine\Util;

defined('PH7') or exit('Restricted access');

use PH7\Framework\Error\CException\PH7InvalidArgumentException;
use PH7\Framework\Mvc\Model\Engine\Db;
use PH7\Framework\Pattern\Statik;

Expand All @@ -29,7 +31,8 @@ class Various
* Executes SQL queries.
*
* @param string $sSqlFile File SQL.
* @return mixed (boolean | array) Returns TRUE if there are no errors, otherwise returns an ARRAY of error information.
*
* @return bool|array Returns TRUE if there are no errors, otherwise returns an ARRAY of error information.
*/
public static function execQueryFile($sSqlFile)
{
Expand All @@ -47,8 +50,10 @@ public static function execQueryFile($sSqlFile)
* Convert mod to table.
*
* @param string $Mod
* @return mixed (string | void) Returns the table if it is correct.
* @throws \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() If the table is not valid.
*
* @return string|voi) Returns the table if it is correct.
*
* @throws self::launchErr() If the table is not valid.
*/
public static function convertModToTable($Mod)
{
Expand Down Expand Up @@ -80,11 +85,13 @@ public static function convertModToTable($Mod)
/**
* Convert table to module name.
*
* @see \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr()
* @see self::launchErr()
*
* @param string $sTable
*
* @return string The correct module name.
* @throws \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() If the table is not valid.
*
* @throws self::launchErr() If the table is not valid.
*/
public static function convertTableToMod($sTable)
{
Expand Down Expand Up @@ -115,11 +122,13 @@ public static function convertTableToMod($sTable)
/**
* Convert table to ID.
*
* @see \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr()
* @see self::launchErr()
*
* @param string $sTable
* @return mixed (string | void) Returns the table if it is correct.
* @throws \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() If the table is not valid.
*
* @return string|void Returns the table if it is correct.
*
* @throws self::launchErr() If the table is not valid.
*/
public static function convertTableToId($sTable)
{
Expand Down Expand Up @@ -175,11 +184,13 @@ public static function convertTableToId($sTable)
/**
* Check table.
*
* @see \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr()
* @see self::launchErr()
*
* @param string $sTable
* @return mixed (string | void) Returns the table if it is correct.
* @throws \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() If the table is not valid.
*
* @return string|void Returns the table if it is correct.
*
* @throws self::launchErr() If the table is not valid.
*/
public static function checkTable($sTable)
{
Expand Down Expand Up @@ -208,11 +219,12 @@ public static function checkTable($sTable)
/**
* Check the model table.
*
* @see \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr()
* @see self::launchErr()
*
* @param string $sTable
* @return mixed (string | void) Returns the table if it is correct.
* @throws \PH7\Framework\Mvc\Model\Engine\Util\Various::launchErr() If the table is not valid.
* @return string|void Returns the table if it is correct.
*
* @throws self::launchErr() If the table is not valid.
*/
public static function checkModelTable($sTable)
{
Expand All @@ -224,7 +236,7 @@ public static function checkModelTable($sTable)
case 'Subscribers':
case 'Admins':
return $sTable;
break;
break;

default:
static::launchErr($sTable);
Expand Down

0 comments on commit d4a4369

Please sign in to comment.