Skip to content

Commit

Permalink
Use strict comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Oct 16, 2014
1 parent 749b7f6 commit 9eb1150
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Database/Schema/SqliteSchema.php
Expand Up @@ -117,12 +117,12 @@ public function convertColumnDescription(Table $table, $row) {
'null' => !$row['notnull'],
'default' => $row['dflt_value'] === null ? null : trim($row['dflt_value'], "'"),
];
if ($row['pk'] == true) {
if ($row['pk'] === true) {
$field['null'] = false;
$field['autoIncrement'] = true;
}
$table->addColumn($row['name'], $field);
if ($row['pk'] == true) {
if ($row['pk'] === true) {
$constraint = (array)$table->constraint('primary') + [
'type' => Table::CONSTRAINT_PRIMARY,
'columns' => []
Expand Down
6 changes: 3 additions & 3 deletions src/Event/EventManagerTrait.php
Expand Up @@ -45,7 +45,7 @@ trait EventManagerTrait {
* @return \Cake\Event\EventManager
*/
public function eventManager(EventManager $eventManager = null) {
if ($eventManager != null) {
if ($eventManager !== null) {
$this->_eventManager = $eventManager;
} elseif (empty($this->_eventManager)) {
$this->_eventManager = new EventManager();
Expand All @@ -54,15 +54,15 @@ public function eventManager(EventManager $eventManager = null) {
}

/**
* Wrapper for creating and dispatching events.
* Wrapper for creating and dispatching events.
*
* Returns a dispatched event.
*
* @param string $name Name of the event.
* @param array $data Any value you wish to be transported with this event to
* it can be read by listeners.
*
* @param object $subject The object that this event applies to
* @param object $subject The object that this event applies to
* ($this by default).
*
* @return \Cake\Event\Event
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/RouteBuilder.php
Expand Up @@ -120,7 +120,7 @@ public function __construct($collection, $path, array $params = [], array $optio
* @return string|void
*/
public function routeClass($routeClass = null) {
if ($routeClass == null) {
if ($routeClass === null) {
return $this->_routeClass;
}
$this->_routeClass = $routeClass;
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/Router.php
Expand Up @@ -154,7 +154,7 @@ class Router {
* @return string|void
*/
public static function defaultRouteClass($routeClass = null) {
if ($routeClass == null) {
if ($routeClass === null) {
return static::$_defaultRouteClass;
}
static::$_defaultRouteClass = $routeClass;
Expand Down
2 changes: 1 addition & 1 deletion src/View/ViewVarsTrait.php
Expand Up @@ -120,7 +120,7 @@ public function viewOptions($options = null, $merge = true) {
$this->_validViewOptions = [];
}

if ($options == null) {
if ($options === null) {
return $this->_validViewOptions;
}

Expand Down

0 comments on commit 9eb1150

Please sign in to comment.