Skip to content

Commit

Permalink
Add {@inheritdoc}, use const on each line, fix invalid mixed type, ..
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed Jun 14, 2017
1 parent 035de2b commit aab396d
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 31 deletions.
13 changes: 10 additions & 3 deletions _protected/framework/Layout/Tpl/Engine/PH7Tpl/PH7Tpl.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@
***************************************************************************/

namespace PH7\Framework\Layout\Tpl\Engine\PH7Tpl;

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

use PH7\Framework\Layout\Html\Design;
use PH7\Framework\Mvc\Model\Design as DesignModel;

class PH7Tpl extends \PH7\Framework\Core\Kernel
use PH7\Framework\Layout\Html\Mail as MailLayout;
use PH7\Framework\Compress\Compress;
use PH7\Framework\Parse\SysVar;
use PH7\Framework\Core\Kernel;
use PH7\Framework\Layout\Tpl\Engine\PH7Tpl\Exception as TplException;
use PH7\Framework\Error\CException\PH7InvalidArgumentException;

class PH7Tpl extends Kernel
{

const
NAME = 'PH7Tpl',
AUTHOR = 'Pierre-Henry Soria',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@
* @updated Last Update 09/11/13 03:44
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @category PH7 Template Engine
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl / Predefined
* @copyright (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.
* @version 1.0.2
* @license CC-BY License - http://creativecommons.org/licenses/by/3.0/
*
***************************************************************************/

namespace PH7\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined;

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

class Func extends Predefined
{

/**
* Assign the global functions.
*
* @return object this
* {@inheritdoc}
*/
public function assign()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @updated Last Update 09/14/13 23:22
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @category PH7 Template Engine
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl / Predefined
* @copyright (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.
* @version 1.0.1
* @license CC-BY License - http://creativecommons.org/licenses/by/3.0/
Expand Down Expand Up @@ -81,8 +81,9 @@ public function get()
}

/**
* @return object this
* Assign the global variables/functions.
*
* @return self
*/
abstract public function assign();

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@
* @updated Last Update 07/02/16 11:02
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @category PH7 Template Engine
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl
* @package PH7 / Framework / Layout / Tpl / Engine / PH7Tpl / Predefined
* @copyright (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.
* @version 1.0.2
* @license CC-BY License - http://creativecommons.org/licenses/by/3.0/
*
***************************************************************************/

namespace PH7\Framework\Layout\Tpl\Engine\PH7Tpl\Predefined;

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

class Variable extends Predefined
{

/**
* Assign the global variables.
*
* @return object this
* {@inheritdoc}
*/
public function assign()
{
Expand Down
3 changes: 3 additions & 0 deletions _protected/framework/Security/Security.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ public static function pwdNeedsRehash($sPassword, $sHash)
*
* @param string $sPassword
* @param integer $iLength Default: 40
*
* @return string The password hashed.
*
* @throws PH7InvalidArgumentException
*/
public static function hashCookie($sPassword, $iLength = 40)
{
Expand Down
2 changes: 1 addition & 1 deletion _protected/framework/Security/Version.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private function __construct() {}
/**
* Gets information on the lastest software version.
*
* @return mixed (array | boolean) Returns version information in an array or FALSE if an error occurred.
* @return array|boolean Returns version information in an array or FALSE if an error occurred.
*/
public static function getLatestInfo()
{
Expand Down
20 changes: 18 additions & 2 deletions _protected/framework/Video/Api/Api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@

abstract class Api
{
protected $oStr, $oData, $sApiKey, $bDefaultVideo, $bAutoplay;
/** @var Str */
protected $oStr;

/** @var \stdClass */
protected $oData;

/** @var string */
protected $sApiKey;

/** @var string */
protected $bDefaultVideo;

/** @var boolean */
protected $bAutoplay;

public function __construct()
{
Expand Down Expand Up @@ -83,7 +96,9 @@ public function getDuration()
*/
public function getEmbedUrl($sUrl)
{
if (!$this->getVideoId($sUrl)) return false;
if (!$this->getVideoId($sUrl)) {
return false;
}

return static::PLAYER_URL . $this->getVideoId($sUrl);
}
Expand All @@ -103,6 +118,7 @@ public function getVideoId($sUrl)
$sUrl = preg_replace('#^/#', '', $sUrl);
$sUrl = preg_replace('#^([^/&=\?]+)(?:.+)?$#i', '$1', $sUrl);
$sUrl = str_replace(array('&', '/'), '', $sUrl); // To finish the cleaning

return $sUrl;
}

Expand Down
5 changes: 2 additions & 3 deletions _protected/framework/Video/Api/Dailymotion.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

class Dailymotion extends Api implements IApi
{
const
API_URL = 'https://api.dailymotion.com/video/',
PLAYER_URL = 'https://www.dailymotion.com/embed/video/';
const API_URL = 'https://api.dailymotion.com/video/';
const PLAYER_URL = 'https://www.dailymotion.com/embed/video/';

/**
* @param string $sUrl
Expand Down
5 changes: 2 additions & 3 deletions _protected/framework/Video/Api/Metacafe.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

class Metacafe extends Api implements IApi
{
const
API_URL = 'http://www.metacafe.com/api/item/',
PLAYER_URL = 'http://metacafe.com/fplayer/';
const API_URL = 'http://www.metacafe.com/api/item/';
const PLAYER_URL = 'http://metacafe.com/fplayer/';

/**
* @param string $sUrl
Expand Down
5 changes: 2 additions & 3 deletions _protected/framework/Video/Api/Vimeo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

class Vimeo extends Api implements IApi
{
const
API_URL = 'https://vimeo.com/api/v2/video/',
PLAYER_URL = 'https://player.vimeo.com/video/';
const API_URL = 'https://vimeo.com/api/v2/video/';
const PLAYER_URL = 'https://player.vimeo.com/video/';

/**
* @param string $sUrl
Expand Down
7 changes: 4 additions & 3 deletions _protected/framework/Video/Api/Youtube.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

class Youtube extends Api implements IApi
{
const
API_URL = 'https://www.googleapis.com/youtube/v3/videos?id=',
PLAYER_URL = 'https://youtube.com/v/';
const API_URL = 'https://www.googleapis.com/youtube/v3/videos?id=';
const PLAYER_URL = 'https://youtube.com/v/';
const REGEX_TIME_FORMAT = '/[0-9]+[HMS]/';

/** @var \stdClass */
private $_oContentDetails;

/**
Expand Down

0 comments on commit aab396d

Please sign in to comment.