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

Commit

Permalink
Merge edd08f4 into 859ccf0
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Apr 3, 2015
2 parents 859ccf0 + edd08f4 commit a6a16b1
Show file tree
Hide file tree
Showing 44 changed files with 58 additions and 58 deletions.
Expand Up @@ -173,7 +173,7 @@ public function getAmbiguityIdentity()
*/
public function getDbSelect()
{
if ($this->dbSelect == null) {
if ($this->dbSelect === null) {
$this->dbSelect = new Sql\Select();
}
return $this->dbSelect;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Renderer/Image.php
Expand Up @@ -375,7 +375,7 @@ protected function drawText($text, $size, $position, $font, $color, $alignment =
$color & 0x0000FF
);

if ($font == null) {
if ($font === null) {
$font = 3;
}
$position[0] += $this->leftOffset;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Generator/FileGenerator.php
Expand Up @@ -302,7 +302,7 @@ public function setClasses(array $classes)
*/
public function getClass($name = null)
{
if ($name == null) {
if ($name === null) {
reset($this->classes);

return current($this->classes);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Generator/FileGeneratorRegistry.php
Expand Up @@ -27,7 +27,7 @@ class FileGeneratorRegistry
*/
public static function registerFileCodeGenerator(FileGenerator $fileCodeGenerator, $fileName = null)
{
if ($fileName == null) {
if ($fileName === null) {
$fileName = $fileCodeGenerator->getFilename();
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Generator/PropertyGenerator.php
Expand Up @@ -204,7 +204,7 @@ public function generate()
}

if ($this->isConst()) {
if ($defaultValue != null && !$defaultValue->isValidConstantType()) {
if ($defaultValue !== null && !$defaultValue->isValidConstantType()) {
throw new Exception\RuntimeException(sprintf(
'The property %s is said to be '
. 'constant but does not have a valid constant value.',
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/NameInformation.php
Expand Up @@ -58,7 +58,7 @@ public function getNamespace()
*/
public function hasNamespace()
{
return ($this->namespace != null);
return ($this->namespace !== null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Reflection/ParameterReflection.php
Expand Up @@ -40,7 +40,7 @@ public function getDeclaringClass()
public function getClass()
{
$phpReflection = parent::getClass();
if ($phpReflection == null) {
if ($phpReflection === null) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Scanner/ClassScanner.php
Expand Up @@ -269,7 +269,7 @@ public function isInterface()
public function hasParentClass()
{
$this->scan();
return ($this->parentClass != null);
return ($this->parentClass !== null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Scanner/DerivedClassScanner.php
Expand Up @@ -123,7 +123,7 @@ public function getParentClasses()
*/
public function hasParentClass()
{
return ($this->classScanner->getParentClass() != null);
return ($this->classScanner->getParentClass() !== null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Code/Scanner/TokenArrayScanner.php
Expand Up @@ -587,7 +587,7 @@ protected function scan()
|| ($tokenType === T_FUNCTION && $infos[$infoIndex]['type'] === 'function'))
) {
$infos[$infoIndex]['shortName'] = $tokens[$tokenIndex + 2][1];
$infos[$infoIndex]['name'] = (($namespace != null) ? $namespace . '\\' : '') . $infos[$infoIndex]['shortName'];
$infos[$infoIndex]['name'] = (($namespace !== null) ? $namespace . '\\' : '') . $infos[$infoIndex]['shortName'];
}

if ($tokenType === null) {
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Db/Adapter/Adapter.php
Expand Up @@ -87,7 +87,7 @@ public function __construct($driver, Platform\PlatformInterface $platform = null
$driver->checkEnvironment();
$this->driver = $driver;

if ($platform == null) {
if ($platform === null) {
$platform = $this->createPlatform($parameters);
}

Expand Down Expand Up @@ -128,7 +128,7 @@ public function getProfiler()
*/
public function getDriver()
{
if ($this->driver == null) {
if ($this->driver === null) {
throw new Exception\RuntimeException('Driver has not been set or configured for this adapter.');
}
return $this->driver;
Expand Down Expand Up @@ -209,7 +209,7 @@ public function query($sql, $parametersOrQueryMode = self::QUERY_MODE_PREPARE, R
public function createStatement($initialSql = null, $initialParameters = null)
{
$statement = $this->driver->createStatement($initialSql);
if ($initialParameters == null || !$initialParameters instanceof ParameterContainer && is_array($initialParameters)) {
if ($initialParameters === null || !$initialParameters instanceof ParameterContainer && is_array($initialParameters)) {
$initialParameters = new ParameterContainer((is_array($initialParameters) ? $initialParameters : array()));
}
$statement->setParameterContainer($initialParameters);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Driver/IbmDb2/Statement.php
Expand Up @@ -167,7 +167,7 @@ public function prepare($sql = null)
throw new Exception\RuntimeException('This statement has been prepared already');
}

if ($sql == null) {
if ($sql === null) {
$sql = $this->sql;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Driver/Pdo/Pdo.php
Expand Up @@ -297,7 +297,7 @@ public function getPrepareType()
*/
public function formatParameterName($name, $type = null)
{
if ($type == null && !is_numeric($name) || $type == self::PARAMETERIZATION_NAMED) {
if ($type === null && !is_numeric($name) || $type == self::PARAMETERIZATION_NAMED) {
return ':' . $name;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Driver/Pdo/Statement.php
Expand Up @@ -179,7 +179,7 @@ public function prepare($sql = null)
throw new Exception\RuntimeException('This statement has been prepared already');
}

if ($sql == null) {
if ($sql === null) {
$sql = $this->sql;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Driver/Pgsql/Connection.php
Expand Up @@ -207,7 +207,7 @@ public function execute($sql)
*/
public function getLastGeneratedValue($name = null)
{
if ($name == null) {
if ($name === null) {
return;
}
$result = pg_query($this->resource, 'SELECT CURRVAL(\'' . str_replace('\'', '\\\'', $name) . '\') as "currval"');
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php
Expand Up @@ -165,7 +165,7 @@ public function createStatement($sqlOrResource = null)
$statement->initialize($this->connection->getResource());
if (is_string($sqlOrResource)) {
$statement->setSql($sqlOrResource);
} elseif ($sqlOrResource != null) {
} elseif ($sqlOrResource !== null) {
throw new Exception\InvalidArgumentException('createStatement() only accepts an SQL string or a Sqlsrv resource');
}
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/ResultSet/AbstractResultSet.php
Expand Up @@ -90,7 +90,7 @@ public function initialize($dataSource)
throw new Exception\InvalidArgumentException('DataSource provided is not an array, nor does it implement Iterator or IteratorAggregate');
}

if ($this->count == null && $this->dataSource instanceof Countable) {
if ($this->count === null && $this->dataSource instanceof Countable) {
$this->count = $this->dataSource->count();
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/RowGateway/AbstractRowGateway.php
Expand Up @@ -71,7 +71,7 @@ public function initialize()
throw new Exception\RuntimeException('This row object does not have a valid table set.');
}

if ($this->primaryKeyColumn == null) {
if ($this->primaryKeyColumn === null) {
throw new Exception\RuntimeException('This row object does not have a primary key column set.');
} elseif (is_string($this->primaryKeyColumn)) {
$this->primaryKeyColumn = (array) $this->primaryKeyColumn;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Sql/Predicate/Predicate.php
Expand Up @@ -57,7 +57,7 @@ public function setUnnest(Predicate $predicate)
*/
public function unnest()
{
if ($this->unnest == null) {
if ($this->unnest === null) {
throw new RuntimeException('Not nested');
}
$unnest = $this->unnest;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Sql/Sql.php
Expand Up @@ -48,7 +48,7 @@ public function getAdapter()

public function hasTable()
{
return ($this->table != null);
return ($this->table !== null);
}

public function setTable($table)
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Sql/TableIdentifier.php
Expand Up @@ -85,7 +85,7 @@ public function getTable()
*/
public function hasSchema()
{
return ($this->schema != null);
return ($this->schema !== null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Sql/Update.php
Expand Up @@ -92,7 +92,7 @@ public function table($table)
*/
public function set(array $values, $flag = self::VALUES_SET)
{
if ($values == null) {
if ($values === null) {
throw new Exception\InvalidArgumentException('set() expects an array of values');
}

Expand Down
Expand Up @@ -62,7 +62,7 @@ public function getSlaveSql()
public function postInitialize()
{
$this->masterSql = $this->tableGateway->sql;
if ($this->slaveSql == null) {
if ($this->slaveSql === null) {
$this->slaveSql = new Sql(
$this->slaveAdapter,
$this->tableGateway->sql->getTable(),
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/TableGateway/Feature/MetadataFeature.php
Expand Up @@ -39,7 +39,7 @@ public function __construct(MetadataInterface $metadata = null)

public function postInitialize()
{
if ($this->metadata == null) {
if ($this->metadata === null) {
$this->metadata = new Metadata($this->tableGateway->adapter);
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Di/Definition/CompilerDefinition.php
Expand Up @@ -100,7 +100,7 @@ public function addDirectoryScanner(DirectoryScanner $directoryScanner)
*/
public function addCodeScannerFile(FileScanner $fileScanner)
{
if ($this->directoryScanner == null) {
if ($this->directoryScanner === null) {
$this->directoryScanner = new DirectoryScanner();
}

Expand Down Expand Up @@ -185,7 +185,7 @@ protected function processClass($class)

$def['supertypes'] = $supertypes;

if ($def['instantiator'] == null) {
if ($def['instantiator'] === null) {
if ($rClass->isInstantiable()) {
$def['instantiator'] = '__construct';
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Di/Definition/RuntimeDefinition.php
Expand Up @@ -233,7 +233,7 @@ protected function processClass($class, $forceLoad = false)

$def['supertypes'] = array_keys(array_flip($supertypes));

if ($def['instantiator'] == null) {
if ($def['instantiator'] === null) {
if ($rClass->isInstantiable()) {
$def['instantiator'] = '__construct';
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Reader/Entry/Rss.php
Expand Up @@ -204,7 +204,7 @@ public function getDateModified()
$date = date_create_from_format($standard, $dateModified);
break;
} catch (\Exception $e) {
if ($standard == null) {
if ($standard === null) {
throw new Exception\RuntimeException(
'Could not load date due to unrecognised'
.' format (should follow RFC 822 or 2822):'
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Feed/Reader/Feed/Rss.php
Expand Up @@ -212,7 +212,7 @@ public function getDateModified()
$date = DateTime::createFromFormat($standard, $dateModified);
break;
} catch (\Exception $e) {
if ($standard == null) {
if ($standard === null) {
throw new Exception\RuntimeException(
'Could not load date due to unrecognised'
.' format (should follow RFC 822 or 2822):'
Expand Down Expand Up @@ -272,7 +272,7 @@ public function getLastBuildDate()
$date = DateTime::createFromFormat($standard, $lastBuildDateParsed);
break;
} catch (\Exception $e) {
if ($standard == null) {
if ($standard === null) {
throw new Exception\RuntimeException(
'Could not load date due to unrecognised'
.' format (should follow RFC 822 or 2822):'
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/File/Transfer/Adapter/AbstractAdapter.php
Expand Up @@ -441,7 +441,7 @@ public function getValidator($name)
*/
public function getValidators($files = null)
{
if ($files == null) {
if ($files === null) {
return $this->validators;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/Word/SeparatorToSeparator.php
Expand Up @@ -87,7 +87,7 @@ public function filter($value)
return $value;
}

if ($this->searchSeparator == null) {
if ($this->searchSeparator === null) {
throw new Exception\RuntimeException('You must provide a search separator for this filter to work.');
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Form/Fieldset.php
Expand Up @@ -203,7 +203,7 @@ public function add($elementOrFieldset, array $flags = array())
*/
public function has($elementOrFieldset)
{
return $this->iterator->get($elementOrFieldset) != null;
return $this->iterator->get($elementOrFieldset) !== null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Http/Response/Stream.php
Expand Up @@ -231,7 +231,7 @@ public static function fromStream($responseString, $stream)
*/
public function getBody()
{
if ($this->stream != null) {
if ($this->stream !== null) {
$this->readStream();
}
return parent::getBody();
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/I18n/Validator/DateTime.php
Expand Up @@ -298,7 +298,7 @@ public function isValid($value)
*/
protected function getIntlDateFormatter()
{
if ($this->formatter == null || $this->invalidateFormatter) {
if ($this->formatter === null || $this->invalidateFormatter) {
$this->formatter = new IntlDateFormatter(
$this->getLocale(),
$this->getDateType(),
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Json/Json.php
Expand Up @@ -333,7 +333,7 @@ public static function fromXml($xmlStringContents, $ignoreXmlAttributes = true)
// If it is not a valid XML content, throw an exception.
if (!$simpleXmlElementObject) {
throw new RuntimeException('Function fromXml was called with an invalid XML formatted string.');
} // End of if ($simpleXmlElementObject == null)
} // End of if ($simpleXmlElementObject === null)

// Call the recursive function to convert the XML into a PHP array.
$resultArray = static::_processXml($simpleXmlElementObject, $ignoreXmlAttributes);
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Mail/Protocol/Imap.php
Expand Up @@ -651,7 +651,7 @@ public function store(array $flags, $from, $to = null, $mode = null, $silent = t

$flags = $this->escapeList($flags);
$set = (int) $from;
if ($to != null) {
if ($to !== null) {
$set .= ':' . ($to == INF ? '*' : (int) $to);
}

Expand Down Expand Up @@ -710,7 +710,7 @@ public function append($folder, $message, $flags = null, $date = null)
public function copy($folder, $from, $to = null)
{
$set = (int) $from;
if ($to != null) {
if ($to !== null) {
$set .= ':' . ($to == INF ? '*' : (int) $to);
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Mail/Protocol/Smtp.php
Expand Up @@ -117,7 +117,7 @@ public function __construct($host = '127.0.0.1', $port = null, array $config = n
case 'ssl':
$this->transport = 'ssl';
$this->secure = 'ssl';
if ($port == null) {
if ($port === null) {
$port = 465;
}
break;
Expand All @@ -128,7 +128,7 @@ public function __construct($host = '127.0.0.1', $port = null, array $config = n
}

// If no port has been specified then check the master PHP ini file. Defaults to 25 if the ini setting is null.
if ($port == null) {
if ($port === null) {
if (($port = ini_get('smtp_port')) == '') {
$port = 25;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Mail/Storage/Imap.php
Expand Up @@ -388,7 +388,7 @@ public function createFolder($name, $parentFolder = null)
// TODO: we assume / as the hierarchy delim - need to get that from the folder class!
if ($parentFolder instanceof Folder) {
$folder = $parentFolder->getGlobalName() . '/' . $name;
} elseif ($parentFolder != null) {
} elseif ($parentFolder !== null) {
$folder = $parentFolder . '/' . $name;
} else {
$folder = $name;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Mail/Storage/Writable/Maildir.php
Expand Up @@ -107,7 +107,7 @@ public function createFolder($name, $parentFolder = null)
{
if ($parentFolder instanceof Folder) {
$folder = $parentFolder->getGlobalName() . $this->delim . $name;
} elseif ($parentFolder != null) {
} elseif ($parentFolder !== null) {
$folder = rtrim($parentFolder, $this->delim) . $this->delim . $name;
} else {
$folder = $name;
Expand Down

0 comments on commit a6a16b1

Please sign in to comment.