Skip to content
Snippets Groups Projects
Commit 44d5a16c authored by Aaron Bauman's avatar Aaron Bauman
Browse files

Code sniff cleanup

parent ced19f8f
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@ class PushParams {
/**
* Return TRUE if the given $key is set.
*
* @param $key
* @param string $key
* A key.
*
* @return bool
......
......@@ -15,7 +15,6 @@ use Symfony\Component\Console\Output\Output;
use Drupal\salesforce\SalesforceAuthProviderPluginManagerInterface;
use Drupal\salesforce\Storage\SalesforceAuthTokenStorageInterface;
/**
* A Drush commandfile.
*
......
......@@ -179,6 +179,7 @@ class SalesforceCommands extends SalesforceCommandsBase {
* @deprecated Use describeFields, describeMetadata, describeRecordTypes...
*
* @return \Consolidation\OutputFormatters\StructuredData\RowsOfFields|null
* Describe result.
*
* @throws \Exception
*/
......
......@@ -17,7 +17,10 @@ class SalesforceAuthListBuilder extends ConfigEntityListBuilder {
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\salesforce\SalesforceAuthProviderInterface $plugin */
$plugin = $entity->getPlugin();
$row['default'] = $entity->authManager()->getProvider() && $entity->authManager()->getProvider()->id() == $entity->id()
$row['default'] = $entity->authManager()
->getProvider() && $entity->authManager()
->getProvider()
->id() == $entity->id()
? $this->t('Default') : '';
$row['label'] = $entity->label();
$row['url'] = $plugin->getCredentials()->getLoginUrl();
......
......@@ -134,7 +134,6 @@ class SalesforceAuthForm extends EntityForm {
}
}
/**
* {@inheritdoc}
*/
......
......@@ -33,7 +33,7 @@ class SFID {
/**
* Given a potential SFID, return a new SFID object if it's valid.
*
* @param $id
* @param string $id
* A potential sfid.
*
* @return \Drupal\salesforce\SFID|false
......@@ -49,7 +49,7 @@ class SFID {
/**
* Returns TRUE if $id is a valid length.
*
* @param $id
* @param string $id
* An sfid.
*
* @return bool
......
......@@ -111,7 +111,7 @@ class SObject {
/**
* Given $key, return corresponding field value.
*
* @return mixed|NULL
* @return mixed|null
* The value, or NULL if given $key is not set.
*
* @see hasField()
......
......@@ -18,6 +18,9 @@ class TestRestClient extends RestClient {
const AUTH_TOKEN_URL = 'https://example.com/fake/token/url/for/testing';
/**
* {@inheritdoc}
*/
public function isInit() {
return TRUE;
}
......@@ -32,7 +35,7 @@ class TestRestClient extends RestClient {
* Hard-code a short list of objects for testing.
*/
public function objects(array $conditions = ['updateable' => TRUE], $reset = FALSE) {
return json_decode(file_get_contents(__DIR__ . '/objects.json'), JSON_OBJECT_AS_ARRAY);
return json_decode(file_get_contents(__DIR__ . '/objects.json'), JSON_OBJECT_AS_ARRAY);
}
/**
......@@ -40,14 +43,14 @@ class TestRestClient extends RestClient {
*/
public function objectDescribe($name, $reset = FALSE) {
$contents = file_get_contents(__DIR__ . '/objectDescribe.json');
return new RestResponseDescribe(new RestResponse(new Response(200, ['Content-Type'=>'application/json;charset=UTF-8'], $contents)));
return new RestResponseDescribe(new RestResponse(new Response(200, ['Content-Type' => 'application/json;charset=UTF-8'], $contents)));
}
/**
* Hard-code record types for testing.
*/
public function getRecordTypes($name = NULL, $reset = FALSE) {
$json = json_decode(file_get_contents(__DIR__ . '/recordTypes.json'), JSON_OBJECT_AS_ARRAY);
$json = json_decode(file_get_contents(__DIR__ . '/recordTypes.json'), JSON_OBJECT_AS_ARRAY);
$result = new SelectQueryResult($json);
$record_types = [];
foreach ($result->records() as $rt) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment