Skip to content

Commit

Permalink
chore: revert cs-fixer and fix a few styles (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Jul 14, 2022
1 parent 073a6cc commit 86e3d51
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 35 deletions.
2 changes: 1 addition & 1 deletion appengine/flexible/storage/app.php
Expand Up @@ -49,7 +49,7 @@
<input type="submit" />
</form>
EOF
);
);
if ($content) {
$response->getBody()->write(
"<p><strong>Your content:</strong><p><p>$escapedContent</p>"
Expand Down
3 changes: 1 addition & 2 deletions appengine/standard/auth/test/DeployTest.php
Expand Up @@ -38,8 +38,7 @@ public function testIndex()
} catch (\GuzzleHttp\Exception\ServerException $e) {
$this->fail($e->getResponse()->getBody());
}
$this->assertEquals('200', $resp->getStatusCode(),
'top page status code');
$this->assertEquals('200', $resp->getStatusCode(), 'top page status code');
$contents = $resp->getBody()->getContents();
$this->assertStringContainsString(
sprintf('Bucket: %s', $projectId),
Expand Down
26 changes: 10 additions & 16 deletions appengine/standard/grpc/test/DeployTest.php
Expand Up @@ -35,11 +35,8 @@ public function testIndex()
} catch (\GuzzleHttp\Exception\ServerException $e) {
$this->fail($e->getResponse()->getBody());
}
$this->assertEquals('200', $resp->getStatusCode(),
'top page status code');
$this->assertStringContainsString(
'Spanner',
$resp->getBody()->getContents());
$this->assertEquals('200', $resp->getStatusCode(), 'top page status code');
$this->assertStringContainsString('Spanner', $resp->getBody()->getContents());
}

public static function beforeDeploy()
Expand Down Expand Up @@ -77,11 +74,8 @@ public function testSpanner()
} catch (\GuzzleHttp\Exception\ServerException $e) {
$this->fail($e->getResponse()->getBody());
}
$this->assertEquals('200', $resp->getStatusCode(),
'top page status code');
$this->assertStringContainsString(
'Hello World',
$resp->getBody()->getContents());
$this->assertEquals('200', $resp->getStatusCode(), 'top page status code');
$this->assertStringContainsString('Hello World', $resp->getBody()->getContents());
}

public function testMonitoring()
Expand All @@ -92,11 +86,11 @@ public function testMonitoring()
} catch (\GuzzleHttp\Exception\ServerException $e) {
$this->fail($e->getResponse()->getBody());
}
$this->assertEquals('200', $resp->getStatusCode(),
'top page status code');
$this->assertEquals('200', $resp->getStatusCode(), 'top page status code');
$this->assertStringContainsString(
'Successfully submitted a time series',
$resp->getBody()->getContents());
$resp->getBody()->getContents()
);
}

public function testSpeech()
Expand All @@ -107,10 +101,10 @@ public function testSpeech()
} catch (\GuzzleHttp\Exception\ServerException $e) {
$this->fail($e->getResponse()->getBody());
}
$this->assertEquals('200', $resp->getStatusCode(),
'top page status code');
$this->assertEquals('200', $resp->getStatusCode(), 'top page status code');
$this->assertStringContainsString(
'Transcription: how old is the Brooklyn Bridge',
$resp->getBody()->getContents());
$resp->getBody()->getContents()
);
}
}
3 changes: 2 additions & 1 deletion appengine/standard/slim-framework/index.php
Expand Up @@ -14,7 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**

/**
* This front controller is called by the App Engine web server to handle all
* incoming requests. To change this, you will need to modify the "entrypoint"
* directive in `app.yaml`.
Expand Down
5 changes: 2 additions & 3 deletions asset/src/list_assets.php
Expand Up @@ -31,11 +31,10 @@ function list_assets(string $projectId, array $assetTypes = [], int $pageSize =
$client = new AssetServiceClient();

// Run request
$response = $client->listAssets(
"projects/$projectId", [
$response = $client->listAssets("projects/$projectId", [
'assetTypes' => $assetTypes,
'pageSize' => $pageSize,
]);
]);

// Print the asset names in the result
foreach ($response->getPage() as $asset) {
Expand Down
4 changes: 2 additions & 2 deletions bigtable/test/BigtableTestTrait.php
Expand Up @@ -77,8 +77,8 @@ public static function createTable($tableIdPrefix, $columns = [])

$columns = $columns ?: ['stats_summary'];
$table = (new Table())->setColumnFamilies(array_combine(
$columns,
array_fill(0, count($columns), new ColumnFamily)
$columns,
array_fill(0, count($columns), new ColumnFamily)
));

self::$tableAdminClient->createtable(
Expand Down
3 changes: 1 addition & 2 deletions compute/api-client/helloworld/app.php
Expand Up @@ -188,8 +188,7 @@ function generateMarkup($apiRequestName, $apiResponse)
$new_instance->setMachineType($machineType);
$new_instance->setNetworkInterfaces(array($googleNetworkInterfaceObj));

$insertInstance = $computeService->instances->insert(DEFAULT_PROJECT,
$zone, $new_instance);
$insertInstance = $computeService->instances->insert(DEFAULT_PROJECT, $zone, $new_instance);
$insertInstanceMarkup = generateMarkup('Insert Instance', $insertInstance);

/**
Expand Down
2 changes: 1 addition & 1 deletion iot/src/list_devices_for_gateway.php
Expand Up @@ -48,7 +48,7 @@ function list_devices_for_gateway(

// Call the API
$devices = $deviceManager->listDevices($registryName,
['gatewayListOptions' => $gatewayListOptions]
['gatewayListOptions' => $gatewayListOptions]
);

// Print the result
Expand Down
2 changes: 1 addition & 1 deletion secretmanager/quickstart.php
Expand Up @@ -44,7 +44,7 @@

// Create the parent secret.
$secret = $client->createSecret($parent, $secretId,
new Secret([
new Secret([
'replication' => new Replication([
'automatic' => new Automatic(),
]),
Expand Down
2 changes: 1 addition & 1 deletion spanner/src/query_data_with_nested_struct_field.php
Expand Up @@ -47,7 +47,7 @@ function query_data_with_nested_struct_field($instanceId, $databaseId)
$database = $instance->database($databaseId);

$nameType = new ArrayType(
(new StructType)
(new StructType)
->add('FirstName', Database::TYPE_STRING)
->add('LastName', Database::TYPE_STRING)
);
Expand Down
4 changes: 2 additions & 2 deletions storage/src/delete_hmac_key.php
Expand Up @@ -43,8 +43,8 @@ function delete_hmac_key($projectId, $accessId)

$hmacKey->delete();
print(
'The key is deleted, though it may still appear in the results of calls ' .
'to StorageClient.hmacKeys([\'showDeletedKeys\' => true])' . PHP_EOL
'The key is deleted, though it may still appear in the results of calls ' .
'to StorageClient.hmacKeys([\'showDeletedKeys\' => true])' . PHP_EOL
);
}
# [END storage_delete_hmac_key]
Expand Down
4 changes: 2 additions & 2 deletions testing/composer.json
Expand Up @@ -7,8 +7,8 @@
"google/auth": "^1.12",
"google/cloud-tools": "dev-main",
"guzzlehttp/guzzle": "^7.0",
"phpunit/phpunit": "^7|^8",
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": "^7|^8,<8.5.27",
"friendsofphp/php-cs-fixer": "^3,<3.9",
"composer/semver": "^3.2"
}
}
2 changes: 1 addition & 1 deletion video/src/analyze_object_tracking_file.php
Expand Up @@ -18,7 +18,7 @@

namespace Google\Cloud\Samples\VideoIntelligence;

// [START video_object_tracking]
// [START video_object_tracking]
use Google\Cloud\VideoIntelligence\V1\VideoIntelligenceServiceClient;
use Google\Cloud\VideoIntelligence\V1\Feature;

Expand Down

0 comments on commit 86e3d51

Please sign in to comment.