Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -44,7 +44,7 @@ class Analyzer {
*/
public function getMessages(ViewExecutable $view) {
$view->initDisplay();
$messages = $this->moduleHandler->invokeAll('views_analyze', array($view));
$messages = $this->moduleHandler->invokeAll('views_analyze', [$view]);
return $messages;
}
@ -57,13 +57,13 @@ class Analyzer {
*/
public function formatMessages(array $messages) {
if (empty($messages)) {
$messages = array(static::formatMessage(t('View analysis can find nothing to report.'), 'ok'));
$messages = [static::formatMessage(t('View analysis can find nothing to report.'), 'ok')];
}
$types = array('ok' => array(), 'warning' => array(), 'error' => array());
$types = ['ok' => [], 'warning' => [], 'error' => []];
foreach ($messages as $message) {
if (empty($types[$message['type']])) {
$types[$message['type']] = array();
$types[$message['type']] = [];
}
$types[$message['type']][] = $message['message'];
}
@ -73,10 +73,10 @@ class Analyzer {
$type .= ' messages';
$message = '';
if (count($messages) > 1) {
$item_list = array(
$item_list = [
'#theme' => 'item_list',
'#items' => $messages,
);
];
$message = drupal_render($item_list);
}
elseif ($messages) {
@ -115,8 +115,8 @@ class Analyzer {
* @return array
* A single formatted message, consisting of a key message and a key type.
*/
static function formatMessage($message, $type = 'error') {
return array('message' => $message, 'type' => $type);
public static function formatMessage($message, $type = 'error') {
return ['message' => $message, 'type' => $type];
}
}