Commit fea11b6d authored by alexpott's avatar alexpott

Issue #2803779 by pfrenssen, klausi, Mile23, alexpott, dawehner: Update Coder...

Issue #2803779 by pfrenssen, klausi, Mile23, alexpott, dawehner: Update Coder to 8.2.10 and fix errors from improved sniffs
parent 2b2f939d
...@@ -3043,21 +3043,22 @@ ...@@ -3043,21 +3043,22 @@
}, },
{ {
"name": "drupal/coder", "name": "drupal/coder",
"version": "8.2.8", "version": "8.2.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/klausi/coder.git", "url": "https://github.com/klausi/coder.git",
"reference": "6d717e1a5a5dd592ebbeaafad11746849fb52532" "reference": "c835ff5c1733676fe0d3f3b861e814d570baaa6f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/klausi/coder/zipball/6d717e1a5a5dd592ebbeaafad11746849fb52532", "url": "https://api.github.com/repos/klausi/coder/zipball/c835ff5c1733676fe0d3f3b861e814d570baaa6f",
"reference": "6d717e1a5a5dd592ebbeaafad11746849fb52532", "reference": "c835ff5c1733676fe0d3f3b861e814d570baaa6f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-mbstring": "*",
"php": ">=5.4.0", "php": ">=5.4.0",
"squizlabs/php_codesniffer": ">=2.5.1", "squizlabs/php_codesniffer": ">=2.7.0 <3.0",
"symfony/yaml": ">=2.0.0" "symfony/yaml": ">=2.0.0"
}, },
"require-dev": { "require-dev": {
...@@ -3075,7 +3076,7 @@ ...@@ -3075,7 +3076,7 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2016-07-05T20:48:03+00:00" "time": "2016-12-09T21:57:53+00:00"
}, },
{ {
"name": "fabpot/goutte", "name": "fabpot/goutte",
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"require-dev": { "require-dev": {
"behat/mink": "1.7.x-dev", "behat/mink": "1.7.x-dev",
"behat/mink-goutte-driver": "~1.2", "behat/mink-goutte-driver": "~1.2",
"drupal/coder": "8.2.8", "drupal/coder": "8.2.10",
"jcalderonzumba/gastonjs": "~1.0.2", "jcalderonzumba/gastonjs": "~1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1", "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
"mikey179/vfsStream": "~1.2", "mikey179/vfsStream": "~1.2",
......
...@@ -730,7 +730,7 @@ function drupal_installation_attempted() { ...@@ -730,7 +730,7 @@ function drupal_installation_attempted() {
* installation state. At all other times, the "install_profile" setting will be * installation state. At all other times, the "install_profile" setting will be
* available in container as a parameter. * available in container as a parameter.
* *
* @return string|null $profile * @return string|null
* The name of the installation profile or NULL if no installation profile is * The name of the installation profile or NULL if no installation profile is
* currently active. This is the case for example during the first steps of * currently active. This is the case for example during the first steps of
* the installer or during unit tests. * the installer or during unit tests.
......
...@@ -37,7 +37,7 @@ public function setHeader(PoHeader $header); ...@@ -37,7 +37,7 @@ public function setHeader(PoHeader $header);
/** /**
* Get header metadata. * Get header metadata.
* *
* @return \Drupal\Component\Gettext\PoHeader $header * @return \Drupal\Component\Gettext\PoHeader
* Header instance representing metadata in a PO header. * Header instance representing metadata in a PO header.
*/ */
public function getHeader(); public function getHeader();
......
...@@ -28,7 +28,7 @@ public function getContextDefinitions(); ...@@ -28,7 +28,7 @@ public function getContextDefinitions();
* @param string $name * @param string $name
* The name of the context in the plugin definition. * The name of the context in the plugin definition.
* *
* @return \Drupal\Component\Plugin\Context\ContextDefinitionInterface. * @return \Drupal\Component\Plugin\Context\ContextDefinitionInterface
* The definition against which the context value must validate. * The definition against which the context value must validate.
* *
* @throws \Drupal\Component\Plugin\Exception\PluginException * @throws \Drupal\Component\Plugin\Exception\PluginException
...@@ -103,7 +103,7 @@ public function setContext($name, ContextInterface $context); ...@@ -103,7 +103,7 @@ public function setContext($name, ContextInterface $context);
* The value to set the context to. The value has to validate against the * The value to set the context to. The value has to validate against the
* provided context definition. * provided context definition.
* *
* @return \Drupal\Component\Plugin\ContextAwarePluginInterface. * @return \Drupal\Component\Plugin\ContextAwarePluginInterface
* A context aware plugin object for chaining. * A context aware plugin object for chaining.
* *
* @throws \Drupal\Component\Plugin\Exception\PluginException * @throws \Drupal\Component\Plugin\Exception\PluginException
......
...@@ -102,7 +102,7 @@ public function setConfigurationValue($key, $value); ...@@ -102,7 +102,7 @@ public function setConfigurationValue($key, $value);
* @param \Drupal\Core\Form\FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form. * The current state of the form.
* *
* @return array $form * @return array
* The renderable form array representing the entire configuration form. * The renderable form array representing the entire configuration form.
*/ */
public function blockForm($form, FormStateInterface $form_state); public function blockForm($form, FormStateInterface $form_state);
......
...@@ -675,7 +675,7 @@ protected function drupalGetPath($type, $name) { ...@@ -675,7 +675,7 @@ protected function drupalGetPath($type, $name) {
/** /**
* Gets the install profile from settings. * Gets the install profile from settings.
* *
* @return string|null $profile * @return string|null
* The name of the installation profile or NULL if no installation profile * The name of the installation profile or NULL if no installation profile
* is currently active. This is the case for example during the first steps * is currently active. This is the case for example during the first steps
* of the installer or during unit tests. * of the installer or during unit tests.
......
...@@ -69,7 +69,7 @@ public function getLanguage() { ...@@ -69,7 +69,7 @@ public function getLanguage() {
/** /**
* Get configuration overrides. * Get configuration overrides.
* *
* @return array. * @return array
* The array of configuration overrides. * The array of configuration overrides.
*/ */
public function getOverrides() { public function getOverrides() {
......
...@@ -287,7 +287,7 @@ protected function languageManager() { ...@@ -287,7 +287,7 @@ protected function languageManager() {
* \Drupal\Core\DependencyInjection\ContainerInjectionInterface should be used * \Drupal\Core\DependencyInjection\ContainerInjectionInterface should be used
* for injecting services. * for injecting services.
* *
* @return \Symfony\Component\DependencyInjection\ContainerInterface $container * @return \Symfony\Component\DependencyInjection\ContainerInterface
* The service container. * The service container.
*/ */
private function container() { private function container() {
......
...@@ -16,7 +16,7 @@ interface ContentEntityFormInterface extends EntityFormInterface { ...@@ -16,7 +16,7 @@ interface ContentEntityFormInterface extends EntityFormInterface {
* @param \Drupal\Core\Form\FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form. * The current state of the form.
* *
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface. * @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface
* The current form display. * The current form display.
*/ */
public function getFormDisplay(FormStateInterface $form_state); public function getFormDisplay(FormStateInterface $form_state);
......
...@@ -16,7 +16,7 @@ interface EntityTypeManagerInterface extends PluginManagerInterface, CachedDisco ...@@ -16,7 +16,7 @@ interface EntityTypeManagerInterface extends PluginManagerInterface, CachedDisco
* @param string $entity_type * @param string $entity_type
* The entity type for this access control handler. * The entity type for this access control handler.
* *
* @return \Drupal\Core\Entity\EntityAccessControlHandlerInterface. * @return \Drupal\Core\Entity\EntityAccessControlHandlerInterface
* A access control handler instance. * A access control handler instance.
*/ */
public function getAccessControlHandler($entity_type); public function getAccessControlHandler($entity_type);
...@@ -40,7 +40,7 @@ public function getStorage($entity_type); ...@@ -40,7 +40,7 @@ public function getStorage($entity_type);
* @param string $entity_type * @param string $entity_type
* The entity type for this view builder. * The entity type for this view builder.
* *
* @return \Drupal\Core\Entity\EntityViewBuilderInterface. * @return \Drupal\Core\Entity\EntityViewBuilderInterface
* A view builder instance. * A view builder instance.
*/ */
public function getViewBuilder($entity_type); public function getViewBuilder($entity_type);
......
...@@ -44,7 +44,7 @@ public function exists($field, $function, $langcode = NULL); ...@@ -44,7 +44,7 @@ public function exists($field, $function, $langcode = NULL);
* Queries for the nonexistence of a field. * Queries for the nonexistence of a field.
* *
* @param string $field * @param string $field
* @return ConditionInterface; * @return ConditionInterface
* @see \Drupal\Core\Entity\Query\QueryInterface::notexists() * @see \Drupal\Core\Entity\Query\QueryInterface::notexists()
*/ */
public function notExists($field, $function, $langcode = NULL); public function notExists($field, $function, $langcode = NULL);
......
...@@ -50,7 +50,7 @@ public function exists($field, $langcode = NULL); ...@@ -50,7 +50,7 @@ public function exists($field, $langcode = NULL);
* Queries for the existence of a field. * Queries for the existence of a field.
* *
* @param string $field * @param string $field
* @return ConditionInterface; * @return ConditionInterface
* @see \Drupal\Core\Entity\Query\QueryInterface::notexists() * @see \Drupal\Core\Entity\Query\QueryInterface::notexists()
*/ */
public function notExists($field, $langcode = NULL); public function notExists($field, $langcode = NULL);
......
...@@ -1723,9 +1723,9 @@ function hook_entity_bundle_field_info(\Drupal\Core\Entity\EntityTypeInterface $ ...@@ -1723,9 +1723,9 @@ function hook_entity_bundle_field_info(\Drupal\Core\Entity\EntityTypeInterface $
if ($entity_type->id() == 'node' && $bundle == 'article') { if ($entity_type->id() == 'node' && $bundle == 'article') {
$fields = array(); $fields = array();
$fields['mymodule_text_more'] = BaseFieldDefinition::create('string') $fields['mymodule_text_more'] = BaseFieldDefinition::create('string')
->setLabel(t('More text')) ->setLabel(t('More text'))
->setComputed(TRUE) ->setComputed(TRUE)
->setClass('\Drupal\mymodule\EntityComputedMoreText'); ->setClass('\Drupal\mymodule\EntityComputedMoreText');
return $fields; return $fields;
} }
} }
......
...@@ -69,7 +69,7 @@ public function getConfig() { ...@@ -69,7 +69,7 @@ public function getConfig() {
* https://www.drupal.org/node/1764380. * https://www.drupal.org/node/1764380.
* @todo This does not set a value in \Drupal::config(), so the name is confusing. * @todo This does not set a value in \Drupal::config(), so the name is confusing.
* *
* @return \Drupal\Core\Executable\ExecutablePluginBase. * @return \Drupal\Core\Executable\ExecutablePluginBase
* The executable object for chaining. * The executable object for chaining.
*/ */
public function setConfig($key, $value) { public function setConfig($key, $value) {
......
...@@ -147,7 +147,7 @@ public function resetConfigFactory() { ...@@ -147,7 +147,7 @@ public function resetConfigFactory() {
/** /**
* Gets the request object. * Gets the request object.
* *
* @return \Symfony\Component\HttpFoundation\Request $request * @return \Symfony\Component\HttpFoundation\Request
* The request object. * The request object.
*/ */
protected function getRequest() { protected function getRequest() {
...@@ -200,7 +200,7 @@ protected function currentUser() { ...@@ -200,7 +200,7 @@ protected function currentUser() {
* \Drupal\Core\DependencyInjection\ContainerInjectionInterface should be used * \Drupal\Core\DependencyInjection\ContainerInjectionInterface should be used
* for injecting services. * for injecting services.
* *
* @return \Symfony\Component\DependencyInjection\ContainerInterface $container * @return \Symfony\Component\DependencyInjection\ContainerInterface
* The service container. * The service container.
*/ */
private function container() { private function container() {
......
...@@ -27,7 +27,7 @@ public function getContextDefinitions(); ...@@ -27,7 +27,7 @@ public function getContextDefinitions();
* @param string $name * @param string $name
* The name of the context in the plugin definition. * The name of the context in the plugin definition.
* *
* @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface. * @return \Drupal\Core\Plugin\Context\ContextDefinitionInterface
* The definition against which the context value must validate. * The definition against which the context value must validate.
* *
* @throws \Drupal\Component\Plugin\Exception\PluginException * @throws \Drupal\Component\Plugin\Exception\PluginException
......
...@@ -80,7 +80,7 @@ public function setPluginId($plugin_id) { ...@@ -80,7 +80,7 @@ public function setPluginId($plugin_id) {
/** /**
* The selected page display variant plugin ID. * The selected page display variant plugin ID.
* *
* @return string; * @return string
*/ */
public function getPluginId() { public function getPluginId() {
return $this->pluginId; return $this->pluginId;
......
...@@ -640,8 +640,10 @@ protected function filterEmbeddedResponse(Request $fake_request, Response $embed ...@@ -640,8 +640,10 @@ protected function filterEmbeddedResponse(Request $fake_request, Response $embed
* *
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* The request for which a response is being sent. * The request for which a response is being sent.
* @param \Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST|\Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST $request_type * @param int $request_type
* The request type. * The request type. Can either be
* \Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST or
* \Symfony\Component\HttpKernel\HttpKernelInterface::SUB_REQUEST.
* @param \Symfony\Component\HttpFoundation\Response $response * @param \Symfony\Component\HttpFoundation\Response $response
* The response to filter. * The response to filter.
* *
......
...@@ -113,7 +113,7 @@ public function populateFromRouteMatch(RouteMatchInterface $route_match) { ...@@ -113,7 +113,7 @@ public function populateFromRouteMatch(RouteMatchInterface $route_match) {
/** /**
* Gets the entity instance for this mapper. * Gets the entity instance for this mapper.
* *
* @return \Drupal\Core\Config\Entity\ConfigEntityInterface $entity * @return \Drupal\Core\Config\Entity\ConfigEntityInterface
* The configuration entity. * The configuration entity.
*/ */
public function getEntity() { public function getEntity() {
......
...@@ -116,14 +116,14 @@ public function testCalculateDependencies() { ...@@ -116,14 +116,14 @@ public function testCalculateDependencies() {
$storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface'); $storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
$storage->expects($this->once()) $storage->expects($this->once())
->method('load') ->method('load')
->with($format_id) ->with($format_id)
->will($this->returnValue($filter_format)); ->will($this->returnValue($filter_format));
$this->entityManager->expects($this->once()) $this->entityManager->expects($this->once())
->method('getStorage') ->method('getStorage')
->with('filter_format') ->with('filter_format')
->will($this->returnValue($storage)); ->will($this->returnValue($storage));
$dependencies = $entity->calculateDependencies()->getDependencies(); $dependencies = $entity->calculateDependencies()->getDependencies();
$this->assertContains('test_module', $dependencies['module']); $this->assertContains('test_module', $dependencies['module']);
......
...@@ -184,7 +184,7 @@ function history_user_delete($account) { ...@@ -184,7 +184,7 @@ function history_user_delete($account) {
* @param int $node_id * @param int $node_id
* The node ID for which to attach the last read timestamp. * The node ID for which to attach the last read timestamp.
* *
* @return array $element * @return array
* A renderable array containing the last read timestamp. * A renderable array containing the last read timestamp.
*/ */
function history_attach_timestamp($node_id) { function history_attach_timestamp($node_id) {
......
...@@ -487,7 +487,7 @@ public function isDisplayed() { ...@@ -487,7 +487,7 @@ public function isDisplayed() {
/** /**
* Gets the entity manager. * Gets the entity manager.
* *
* @return \Drupal\Core\Entity\EntityManagerInterface. * @return \Drupal\Core\Entity\EntityManagerInterface
*/ */
protected function getEntityManager() { protected function getEntityManager() {
if (!isset($this->entityManager)) { if (!isset($this->entityManager)) {
......
...@@ -88,14 +88,14 @@ public function testPassingMigration() { ...@@ -88,14 +88,14 @@ public function testPassingMigration() {
*/ */
public function testMissingEffectPlugin() { public function testMissingEffectPlugin() {
Database::getConnection('default', 'migrate')->insert("imagecache_action") Database::getConnection('default', 'migrate')->insert("imagecache_action")
->fields([ ->fields([
'presetid', 'presetid',
'weight', 'weight',
'module', 'module',
'action', 'action',
'data', 'data',
]) ])
->values([ ->values([
'presetid' => '1', 'presetid' => '1',
'weight' => '0', 'weight' => '0',
'module' => 'imagecache', 'module' => 'imagecache',
...@@ -121,14 +121,14 @@ public function testMissingEffectPlugin() { ...@@ -121,14 +121,14 @@ public function testMissingEffectPlugin() {
*/ */
public function testInvalidCropValues() { public function testInvalidCropValues() {
Database::getConnection('default', 'migrate')->insert("imagecache_action") Database::getConnection('default', 'migrate')->insert("imagecache_action")
->fields([ ->fields([
'presetid', 'presetid',
'weight', 'weight',
'module', 'module',
'action', 'action',
'data', 'data',
]) ])
->values([ ->values([
'presetid' => '1', 'presetid' => '1',
'weight' => '0', 'weight' => '0',
'module' => 'imagecache', 'module' => 'imagecache',
......
...@@ -170,11 +170,11 @@ public function testGetPathToken() { ...@@ -170,11 +170,11 @@ public function testGetPathToken() {
$image_style = $this->getImageStyleMock($image_effect_id, $image_effect, array('getPrivateKey', 'getHashSalt')); $image_style = $this->getImageStyleMock($image_effect_id, $image_effect, array('getPrivateKey', 'getHashSalt'));
$image_style->expects($this->any()) $image_style->expects($this->any())
->method('getPrivateKey') ->method('getPrivateKey')
->will($this->returnValue($private_key)); ->will($this->returnValue($private_key));
$image_style->expects($this->any()) $image_style->expects($this->any())
->method('getHashSalt') ->method('getHashSalt')
->will($this->returnValue($hash_salt)); ->will($this->returnValue($hash_salt));
// Assert the extension has been added to the URI before creating the token. // Assert the extension has been added to the URI before creating the token.
$this->assertEquals($image_style->getPathToken('public://test.jpeg.png'), $image_style->getPathToken('public://test.jpeg')); $this->assertEquals($image_style->getPathToken('public://test.jpeg.png'), $image_style->getPathToken('public://test.jpeg'));
...@@ -192,11 +192,11 @@ public function testGetPathToken() { ...@@ -192,11 +192,11 @@ public function testGetPathToken() {
$image_style = $this->getImageStyleMock($image_effect_id, $image_effect, array('getPrivateKey', 'getHashSalt')); $image_style = $this->getImageStyleMock($image_effect_id, $image_effect, array('getPrivateKey', 'getHashSalt'));
$image_style->expects($this->any()) $image_style->expects($this->any())
->method('getPrivateKey') ->method('getPrivateKey')
->will($this->returnValue($private_key)); ->will($this->returnValue($private_key));
$image_style->expects($this->any()) $image_style->expects($this->any())
->method('getHashSalt') ->method('getHashSalt')
->will($this->returnValue($hash_salt)); ->will($this->returnValue($hash_salt));
// Assert no extension has been added to the uri before creating the token. // Assert no extension has been added to the uri before creating the token.
$this->assertNotEquals($image_style->getPathToken('public://test.jpeg.png'), $image_style->getPathToken('public://test.jpeg')); $this->assertNotEquals($image_style->getPathToken('public://test.jpeg.png'), $image_style->getPathToken('public://test.jpeg'));
$this->assertNotEquals(substr(Crypt::hmacBase64($image_style->id() . ':' . 'public://test.jpeg.png', $private_key . $hash_salt), 0, 8), $image_style->getPathToken('public://test.jpeg')); $this->assertNotEquals(substr(Crypt::hmacBase64($image_style->id() . ':' . 'public://test.jpeg.png', $private_key . $hash_salt), 0, 8), $image_style->getPathToken('public://test.jpeg'));
......
...@@ -146,7 +146,7 @@ function language_element_info_alter(&$type) { ...@@ -146,7 +146,7 @@ function language_element_info_alter(&$type) {
* @param array $element * @param array $element
* The form element to process. * The form element to process.
* *
* @return array $element * @return array
* The processed form element. * The processed form element.
*/ */
function language_process_language_select($element) { function language_process_language_select($element) {
......
...@@ -77,7 +77,7 @@ public function getLanguageConfigOverride($langcode, $name); ...@@ -77,7 +77,7 @@ public function getLanguageConfigOverride($langcode, $name);
* @param string $langcode * @param string $langcode
* The language code for the override. * The language code for the override.
* *
* @return \Drupal\Core\Config\StorageInterface $storage * @return \Drupal\Core\Config\StorageInterface
* A storage object to use for reading and writing the * A storage object to use for reading and writing the
* configuration override. * configuration override.
*/ */
......
...@@ -92,7 +92,7 @@ public function getFormula($langcode) { ...@@ -92,7 +92,7 @@ public function getFormula($langcode) {
/** /**
* Loads the formulae and stores them on the PluralFormula object if not set. * Loads the formulae and stores them on the PluralFormula object if not set.
* *
* @return [] * @return array
*/ */
protected function loadFormulae() { protected function loadFormulae() {
if (!isset($this->formulae)) { if (!isset($this->formulae)) {
......
...@@ -417,8 +417,8 @@ protected function dbStringSelect(array $conditions, array $options = array()) { ...@@ -417,8 +417,8 @@ protected function dbStringSelect(array $conditions, array $options = array()) {
// Conditions for target fields when doing an outer join only make // Conditions for target fields when doing an outer join only make
// sense if we add also OR field IS NULL. // sense if we add also OR field IS NULL.
$query->condition(db_or() $query->condition(db_or()
->condition($field_alias, (array) $value, 'IN') ->condition($field_alias, (array) $value, 'IN')
->isNull($field_alias) ->isNull($field_alias)
); );
} }
else { else {
......
...@@ -55,7 +55,7 @@ public function __construct(DiscoveryInterface $decorated, callable $provider_ex ...@@ -55,7 +55,7 @@ public function __construct(DiscoveryInterface $decorated, callable $provider_ex
* A callable, gets passed a provider name, should return TRUE if the * A callable, gets passed a provider name, should return TRUE if the
* provider exists and FALSE if not. * provider exists and FALSE if not.
* *
* @return array|\mixed[] $definitions * @return array|\mixed[]
* An array of plugin definitions. If a definition is an array and has a * An array of plugin definitions. If a definition is an array and has a
* provider key that provider is guaranteed to exist. * provider key that provider is guaranteed to exist.
*/ */
......
...@@ -485,7 +485,7 @@ protected function getFieldSchema(array $id_definition) { ...@@ -485,7 +485,7 @@ protected function getFieldSchema(array $id_definition) {
*/ */