Commit 13e82d2e authored by Crell's avatar Crell
Browse files

Rename more type hints.

parent 17d5b68d
...@@ -53,7 +53,7 @@ public function nextPlaceholder() { ...@@ -53,7 +53,7 @@ public function nextPlaceholder() {
return $this->placeholder++; return $this->placeholder++;
} }
/* Implementations of QueryAlterableInterface. */ /* Implementations of AlterableInterface. */
public function addTag($tag) { public function addTag($tag) {
$this->query->addTag($tag); $this->query->addTag($tag);
......
<?php <?php
use Drupal\Database\Query\AlterableInterface;
/** /**
* Implements hook_query_alter(). * Implements hook_query_alter().
*/ */
function database_test_query_alter(QueryAlterableInterface $query) { function database_test_query_alter(AlterableInterface $query) {
if ($query->hasTag('database_test_alter_add_range')) { if ($query->hasTag('database_test_alter_add_range')) {
$query->range(0, 2); $query->range(0, 2);
...@@ -37,7 +39,7 @@ function database_test_query_alter(QueryAlterableInterface $query) { ...@@ -37,7 +39,7 @@ function database_test_query_alter(QueryAlterableInterface $query) {
* *
* Called by DatabaseTestCase::testAlterRemoveRange. * Called by DatabaseTestCase::testAlterRemoveRange.
*/ */
function database_test_query_database_test_alter_remove_range_alter(QueryAlterableInterface $query) { function database_test_query_database_test_alter_remove_range_alter(AlterableInterface $query) {
$query->range(); $query->range();
} }
......
<?php <?php
use Drupal\Database\Query\AlterableInterface;
/** /**
* @file * @file
* Hooks provided by Drupal core and the System module. * Hooks provided by Drupal core and the System module.
...@@ -2741,10 +2743,10 @@ function hook_schema_alter(&$schema) { ...@@ -2741,10 +2743,10 @@ function hook_schema_alter(&$schema) {
* *
* @see hook_query_TAG_alter() * @see hook_query_TAG_alter()
* @see node_query_node_access_alter() * @see node_query_node_access_alter()
* @see QueryAlterableInterface * @see AlterableInterface
* @see SelectQueryInterface * @see SelectInterface
*/ */
function hook_query_alter(QueryAlterableInterface $query) { function hook_query_alter(AlterableInterface $query) {
if ($query->hasTag('micro_limit')) { if ($query->hasTag('micro_limit')) {
$query->range(0, 2); $query->range(0, 2);
} }
...@@ -2758,10 +2760,10 @@ function hook_query_alter(QueryAlterableInterface $query) { ...@@ -2758,10 +2760,10 @@ function hook_query_alter(QueryAlterableInterface $query) {
* *
* @see hook_query_alter() * @see hook_query_alter()
* @see node_query_node_access_alter() * @see node_query_node_access_alter()
* @see QueryAlterableInterface * @see AlterableInterface
* @see SelectQueryInterface * @see SelectInterface
*/ */
function hook_query_TAG_alter(QueryAlterableInterface $query) { function hook_query_TAG_alter(AlterableInterface $query) {
// Skip the extra expensive alterations if site has no node access control modules. // Skip the extra expensive alterations if site has no node access control modules.
if (!node_access_view_all_nodes()) { if (!node_access_view_all_nodes()) {
// Prevent duplicates records. // Prevent duplicates records.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment