Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
change self:: with static:: in call-ing static property/method
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Oct 23, 2013
1 parent 7e35e65 commit ab9583a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions library/Zend/Code/Generator/DocBlockGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public static function fromArray(array $array)

protected static function getTagManager()
{
if (!isset(self::$tagManager)) {
self::$tagManager = new TagManager();
self::$tagManager->initializeDefaultTags();
if (!isset(static::$tagManager)) {
static::$tagManager = new TagManager();
static::$tagManager->initializeDefaultTags();
}
return self::$tagManager;
return static::$tagManager;
}


Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Mail/Header/ContentTransferEncoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public function toString()
*/
public function setTransferEncoding($transferEncoding)
{
if (!in_array($transferEncoding, self::$allowedTransferEncodings)) {
if (!in_array($transferEncoding, static::$allowedTransferEncodings)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects one of "'. implode(', ', self::$allowedTransferEncodings) . '"; received "%s"',
'%s expects one of "'. implode(', ', static::$allowedTransferEncodings) . '"; received "%s"',
__METHOD__,
(string) $transferEncoding
));
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Navigation/Page/AbstractPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ public static function factory($options)
}
}

if (self::$factories) {
foreach (self::$factories as $factoryCallBack) {
if (static::$factories) {
foreach (static::$factories as $factoryCallBack) {
if (($page = call_user_func($factoryCallBack, $options))) {
return $page;
}
Expand Down Expand Up @@ -264,7 +264,7 @@ public static function factory($options)
*/
public static function addFactory($callback)
{
self::$factories[] = $callback;
static::$factories[] = $callback;
}

/**
Expand Down
14 changes: 7 additions & 7 deletions library/Zend/Version/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ public static function compareVersion($version)
*/
public static function getLatest($service = self::VERSION_SERVICE_ZEND, Http\Client $httpClient = null)
{
if (null !== self::$latestVersion) {
return self::$latestVersion;
if (null !== static::$latestVersion) {
return static::$latestVersion;
}

self::$latestVersion = 'not available';
static::$latestVersion = 'not available';

if (null === $httpClient && !ini_get('allow_url_fopen')) {
trigger_error(
Expand All @@ -96,7 +96,7 @@ public static function getLatest($service = self::VERSION_SERVICE_ZEND, Http\Cli
E_USER_WARNING
);

return self::$latestVersion;
return static::$latestVersion;
}

$response = false;
Expand All @@ -115,10 +115,10 @@ public static function getLatest($service = self::VERSION_SERVICE_ZEND, Http\Cli
}

if ($response) {
self::$latestVersion = $response;
static::$latestVersion = $response;
}

return self::$latestVersion;
return static::$latestVersion;
}

/**
Expand All @@ -130,7 +130,7 @@ public static function getLatest($service = self::VERSION_SERVICE_ZEND, Http\Cli
*/
public static function isLatest()
{
return self::compareVersion(self::getLatest()) < 1;
return static::compareVersion(self::getLatest()) < 1;
}

/**
Expand Down

0 comments on commit ab9583a

Please sign in to comment.