public function checkPassword(string $username, string $password) {
$uid = user_authenticate($username, $password);
// Ensure strict nullness.
- return $uid ? $uid : NULL;
+ return $uid ?: NULL;
}
/**
public function checkPassword(string $username, string $password) {
$uid = user_authenticate($username, $password);
// Ensure strict nullness.
- return $uid ? $uid : NULL;
+ return $uid ?: NULL;
}
/**
public function checkPassword(string $username, string $password) {
$uid = \Drupal::service('user.auth')->authenticate($username, $password);
// Ensure strict nullness.
- return $uid ? $uid : NULL;
+ return $uid ?: NULL;
}
/**
*/
public function __construct($context = array(), EventDispatcherInterface $dispatcher = NULL) {
$this->context = $context;
- $this->dispatcher = $dispatcher ? $dispatcher : \Civi::service('dispatcher');
+ $this->dispatcher = $dispatcher ?: \Civi::service('dispatcher');
}
/**
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
*/
public function __construct(EventDispatcherInterface $dispatcher = NULL) {
- $this->dispatcher = $dispatcher ? $dispatcher : \Civi::service('dispatcher');
+ $this->dispatcher = $dispatcher ?: \Civi::service('dispatcher');
}
/**
$fileName = $this->_customClass->templateFile();
}
- return $fileName ? $fileName : parent::getTemplateFileName();
+ return $fileName ?: parent::getTemplateFileName();
}
public function postProcess() {