diff --git a/.travis.yml b/.travis.yml index dd45013f2..09407a4a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,8 @@ branches: before_script: - composer install --prefer-source - - ./vendor/bin/parallel-lint --exclude vendor . + - vendor/bin/parallel-lint --exclude vendor . + - vendor/bin/php-cs-fixer fix --dry-run --level psr2 . after_script: - php vendor/bin/coveralls -v diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a500b696d..381746f2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ efforts. Here are a few general guidelines to follow: will need to write new test cases; if you're updating existing code, you will need to make sure the methods you're updating are still completely covered. -3. Please abide by PSR code styling. +3. Please abide by [PSR-2 code styling](#ensuring-psr-2-coding-style-compliance). 4. Explaining your pull requests is appreciated. Unless you're fixing a minor typographical error, create a description which explains your changes @@ -44,3 +44,11 @@ phpunit * Methods that create a new resource, say `Foo`, should be named `createFoo`. For example, [`createEntity`](/lib/OpenCloud/CloudMonitoring/Service.php#L105). * When validating arguments to a method, please throw `\InvalidArgumentException` when an invalid argument is found. For example, see [here](/lib/OpenCloud/LoadBalancer/Resource/LoadBalancer.php#L212-L215). + +## Ensuring PSR-2 coding style compliance + +The code in this library is compliant with the [PSR-2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). To ensure that any code you contribute is also PSR-2 compliant, please run the following command from the base directory of this project _before_ submitting your contribution: + + $ vendor/bin/php-cs-fixer fix --level psr2 . + +Running this command will _change_ your code to become PSR-2 compliant. You will need to _commit_ these changes and make them part of your pull request. diff --git a/composer.json b/composer.json index 55e7974bc..c149f3f33 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "require-dev" : { "guzzle/guzzle": "~3.8", "satooshi/php-coveralls": "0.6.*@dev", - "jakub-onderka/php-parallel-lint": "0.*" + "jakub-onderka/php-parallel-lint": "0.*", + "fabpot/php-cs-fixer": "1.0.*@dev" } } diff --git a/lib/OpenCloud/Autoscale/Resource/LaunchConfiguration.php b/lib/OpenCloud/Autoscale/Resource/LaunchConfiguration.php index f4f683f7a..29951254c 100644 --- a/lib/OpenCloud/Autoscale/Resource/LaunchConfiguration.php +++ b/lib/OpenCloud/Autoscale/Resource/LaunchConfiguration.php @@ -38,7 +38,6 @@ */ class LaunchConfiguration extends AbstractResource { - public $type; public $args; diff --git a/lib/OpenCloud/CloudMonitoring/Collection/MonitoringIterator.php b/lib/OpenCloud/CloudMonitoring/Collection/MonitoringIterator.php index 3f348e2f4..0f629bf39 100644 --- a/lib/OpenCloud/CloudMonitoring/Collection/MonitoringIterator.php +++ b/lib/OpenCloud/CloudMonitoring/Collection/MonitoringIterator.php @@ -32,4 +32,4 @@ public function parseResponseBody($body) return $parsed; } -} \ No newline at end of file +} diff --git a/lib/OpenCloud/CloudMonitoring/Resource/Agent.php b/lib/OpenCloud/CloudMonitoring/Resource/Agent.php index a566dc83f..eead7c6f4 100644 --- a/lib/OpenCloud/CloudMonitoring/Resource/Agent.php +++ b/lib/OpenCloud/CloudMonitoring/Resource/Agent.php @@ -89,4 +89,4 @@ public function getAgentHost() { return $this->getService()->resource('AgentHost', null, $this); } -} \ No newline at end of file +} diff --git a/lib/OpenCloud/CloudMonitoring/Resource/AgentHost.php b/lib/OpenCloud/CloudMonitoring/Resource/AgentHost.php index 3e71c8a9f..b056c60c3 100644 --- a/lib/OpenCloud/CloudMonitoring/Resource/AgentHost.php +++ b/lib/OpenCloud/CloudMonitoring/Resource/AgentHost.php @@ -57,4 +57,4 @@ public function info($type) 'resourceClass' => 'AgentHostInfo' )); } -} \ No newline at end of file +} diff --git a/lib/OpenCloud/CloudMonitoring/Resource/AgentTarget.php b/lib/OpenCloud/CloudMonitoring/Resource/AgentTarget.php index 795bd4a1c..b5b85025b 100644 --- a/lib/OpenCloud/CloudMonitoring/Resource/AgentTarget.php +++ b/lib/OpenCloud/CloudMonitoring/Resource/AgentTarget.php @@ -24,7 +24,6 @@ */ class AgentTarget extends ReadOnlyResource { - private $type = 'agent.filesystem'; protected static $json_name = 'targets'; diff --git a/lib/OpenCloud/CloudMonitoring/Resource/ReadOnlyResource.php b/lib/OpenCloud/CloudMonitoring/Resource/ReadOnlyResource.php index 48f2c0329..4fd3681f3 100644 --- a/lib/OpenCloud/CloudMonitoring/Resource/ReadOnlyResource.php +++ b/lib/OpenCloud/CloudMonitoring/Resource/ReadOnlyResource.php @@ -24,7 +24,6 @@ */ class ReadOnlyResource extends AbstractResource { - public function create($params = array()) { return $this->noCreate(); diff --git a/lib/OpenCloud/Common/Base.php b/lib/OpenCloud/Common/Base.php index f0b0986ad..3e0bc3dfb 100644 --- a/lib/OpenCloud/Common/Base.php +++ b/lib/OpenCloud/Common/Base.php @@ -110,7 +110,6 @@ protected function setProperty($property, $value) if (method_exists($this, $setter)) { return call_user_func(array($this, $setter), $value); } elseif (false !== ($propertyVal = $this->propertyExists($property))) { - // Are we setting a public or private property? if ($this->isAccessible($propertyVal)) { $this->$propertyVal = $value; @@ -120,7 +119,6 @@ protected function setProperty($property, $value) return $this; } else { - $this->getLogger()->warning( 'Attempted to set {property} with value {value}, but the' . ' property has not been defined. Please define first.', @@ -284,15 +282,11 @@ public function url($path = null, array $query = array()) public function populate($info, $setObjects = true) { if (is_string($info) || is_integer($info)) { - $this->setProperty($this->primaryKeyField(), $info); $this->refresh($info); } elseif (is_object($info) || is_array($info)) { - foreach ($info as $key => $value) { - if ($key == 'metadata' || $key == 'meta') { - // Try retrieving existing value if (null === ($metadata = $this->getProperty($key))) { // If none exists, create new object @@ -305,10 +299,8 @@ public function populate($info, $setObjects = true) // Set object property $this->setProperty($key, $metadata); } elseif (!empty($this->associatedResources[$key]) && $setObjects === true) { - // Associated resource try { - $resource = $this->getService()->resource($this->associatedResources[$key], $value); $resource->setParent($this); @@ -316,10 +308,8 @@ public function populate($info, $setObjects = true) } catch (Exception\ServiceException $e) { } } elseif (!empty($this->associatedCollections[$key]) && $setObjects === true) { - // Associated collection try { - $className = $this->associatedCollections[$key]; $options = $this->makeResourceIteratorOptions($className); $iterator = ResourceIterator::factory($this, $options, $value); @@ -328,7 +318,6 @@ public function populate($info, $setObjects = true) } catch (Exception\ServiceException $e) { } } elseif (!empty($this->aliases[$key])) { - // Sometimes we might want to preserve camelCase // or covert `rax-bandwidth:bandwidth` to `raxBandwidth` $this->setProperty($this->aliases[$key], $value); diff --git a/lib/OpenCloud/Common/Collection.php b/lib/OpenCloud/Common/Collection.php index 7d4990c55..f2710639e 100644 --- a/lib/OpenCloud/Common/Collection.php +++ b/lib/OpenCloud/Common/Collection.php @@ -23,7 +23,6 @@ */ class Collection extends Base { - private $service; private $itemClass; private $itemList = array(); diff --git a/lib/OpenCloud/Common/Collection/PaginatedIterator.php b/lib/OpenCloud/Common/Collection/PaginatedIterator.php index 7c202f0fb..a0628993d 100644 --- a/lib/OpenCloud/Common/Collection/PaginatedIterator.php +++ b/lib/OpenCloud/Common/Collection/PaginatedIterator.php @@ -265,7 +265,6 @@ public function extractNextLink($body) public function constructNextUrl() { if (!$url = $this->nextUrl) { - $url = clone $this->getOption('baseUrl'); $query = $url->getQuery(); diff --git a/lib/OpenCloud/Common/Exceptions/ResourceBucketException.php b/lib/OpenCloud/Common/Exceptions/ResourceBucketException.php index 94dda945e..82c7ea2b0 100644 --- a/lib/OpenCloud/Common/Exceptions/ResourceBucketException.php +++ b/lib/OpenCloud/Common/Exceptions/ResourceBucketException.php @@ -19,5 +19,4 @@ class ResourceBucketException extends \Exception { - } diff --git a/lib/OpenCloud/Common/Http/Message/Formatter.php b/lib/OpenCloud/Common/Http/Message/Formatter.php index 0c6864029..1f2b8c2a4 100644 --- a/lib/OpenCloud/Common/Http/Message/Formatter.php +++ b/lib/OpenCloud/Common/Http/Message/Formatter.php @@ -24,7 +24,6 @@ class Formatter { - public static function decode(Response $response) { if (strpos($response->getHeader(Header::CONTENT_TYPE), Mime::JSON) !== false) { diff --git a/lib/OpenCloud/Common/Lang.php b/lib/OpenCloud/Common/Lang.php index bffdbffb0..7c124e5bc 100644 --- a/lib/OpenCloud/Common/Lang.php +++ b/lib/OpenCloud/Common/Lang.php @@ -19,7 +19,6 @@ class Lang { - public static function translate($word = null) { return $word; diff --git a/lib/OpenCloud/Common/Log/Logger.php b/lib/OpenCloud/Common/Log/Logger.php index c9de3ea3c..7eb48cdc0 100644 --- a/lib/OpenCloud/Common/Log/Logger.php +++ b/lib/OpenCloud/Common/Log/Logger.php @@ -235,7 +235,6 @@ private function dispatch($message, $context) // Output to file file_put_contents($file, $this->formatFileLine($output), FILE_APPEND); } else { - echo $output; } } @@ -246,4 +245,4 @@ public function deprecated($method, $new) return $this->warning($string); } -} \ No newline at end of file +} diff --git a/lib/OpenCloud/Common/Resource/BaseResource.php b/lib/OpenCloud/Common/Resource/BaseResource.php index 1a9c5e80e..76c48cf10 100644 --- a/lib/OpenCloud/Common/Resource/BaseResource.php +++ b/lib/OpenCloud/Common/Resource/BaseResource.php @@ -148,7 +148,6 @@ public function getMetadata() public function getUrl($path = null, array $query = array()) { if (!$url = $this->findLink('self')) { - // ...otherwise construct a URL from parent and this resource's // "URL name". If no name is set, resourceName() throws an error. $url = $this->getParent()->getUrl($this->resourceName()); diff --git a/lib/OpenCloud/Common/Resource/PersistentResource.php b/lib/OpenCloud/Common/Resource/PersistentResource.php index 7b449abdc..e87d46323 100644 --- a/lib/OpenCloud/Common/Resource/PersistentResource.php +++ b/lib/OpenCloud/Common/Resource/PersistentResource.php @@ -184,7 +184,6 @@ public function waitFor($state = null, $timeout = null, $callback = null, $inter $states = array('ERROR', $state); while (true) { - $this->refresh($this->getProperty($this->primaryKeyField())); if ($callback) { diff --git a/lib/OpenCloud/Common/Service/NovaService.php b/lib/OpenCloud/Common/Service/NovaService.php index e3fb1a894..e03508ad4 100644 --- a/lib/OpenCloud/Common/Service/NovaService.php +++ b/lib/OpenCloud/Common/Service/NovaService.php @@ -24,7 +24,6 @@ */ abstract class NovaService extends CatalogService { - /** * Returns a flavor from the service * diff --git a/lib/OpenCloud/Common/Service/ServiceBuilder.php b/lib/OpenCloud/Common/Service/ServiceBuilder.php index 3fa394ea9..cf59f4a2b 100644 --- a/lib/OpenCloud/Common/Service/ServiceBuilder.php +++ b/lib/OpenCloud/Common/Service/ServiceBuilder.php @@ -25,7 +25,6 @@ */ class ServiceBuilder { - /** * Simple factory method for creating services. * diff --git a/lib/OpenCloud/Compute/Resource/Flavor.php b/lib/OpenCloud/Compute/Resource/Flavor.php index 13c55bbb5..b21a1fe97 100644 --- a/lib/OpenCloud/Compute/Resource/Flavor.php +++ b/lib/OpenCloud/Compute/Resource/Flavor.php @@ -25,7 +25,6 @@ */ class Flavor extends PersistentObject { - public $status; public $updated; public $vcpus; diff --git a/lib/OpenCloud/Compute/Resource/Network.php b/lib/OpenCloud/Compute/Resource/Network.php index c2fefd016..82aba2580 100644 --- a/lib/OpenCloud/Compute/Resource/Network.php +++ b/lib/OpenCloud/Compute/Resource/Network.php @@ -28,7 +28,6 @@ */ class Network extends PersistentObject { - public $id; public $label; public $cidr; @@ -128,7 +127,6 @@ protected function createJson() public function getUrl($path = null, array $query = array()) { if (!$url = $this->findLink('self')) { - $url = $this->getParent()->getUrl($this->getResourcePath()); if (null !== ($primaryKey = $this->getProperty($this->primaryKeyField()))) { diff --git a/lib/OpenCloud/Compute/Resource/Server.php b/lib/OpenCloud/Compute/Resource/Server.php index e4e421250..20a7692e5 100644 --- a/lib/OpenCloud/Compute/Resource/Server.php +++ b/lib/OpenCloud/Compute/Resource/Server.php @@ -664,7 +664,6 @@ protected function createJson() // Boot from volume if ($this->volume instanceof Volume) { - $this->checkExtension('os-block-device-mapping-v2-boot'); $server->block_device_mapping_v2 = array(); @@ -675,12 +674,10 @@ protected function createJson() 'boot_index' => 0, 'delete_on_termination' => (boolean) $this->volumeDeleteOnTermination ); - } // Networks if (is_array($this->networks) && count($this->networks)) { - $server->networks = array(); foreach ($this->networks as $network) { diff --git a/lib/OpenCloud/Compute/Resource/ServerMetadata.php b/lib/OpenCloud/Compute/Resource/ServerMetadata.php index 11d851f99..28f2f8650 100644 --- a/lib/OpenCloud/Compute/Resource/ServerMetadata.php +++ b/lib/OpenCloud/Compute/Resource/ServerMetadata.php @@ -51,7 +51,6 @@ public function __construct(Server $parent, $key = null) // set the URL according to whether or not we have a key if ($this->getParent()->getId()) { - $this->url = $this->getParent()->url('metadata'); $this->key = $key; diff --git a/lib/OpenCloud/Compute/Resource/VolumeAttachment.php b/lib/OpenCloud/Compute/Resource/VolumeAttachment.php index 3caa28867..07892942c 100644 --- a/lib/OpenCloud/Compute/Resource/VolumeAttachment.php +++ b/lib/OpenCloud/Compute/Resource/VolumeAttachment.php @@ -26,7 +26,6 @@ */ class VolumeAttachment extends PersistentObject { - public $id; public $device; public $serverId; diff --git a/lib/OpenCloud/DNS/Resource/AsyncResponse.php b/lib/OpenCloud/DNS/Resource/AsyncResponse.php index 97e04808a..952aa1642 100644 --- a/lib/OpenCloud/DNS/Resource/AsyncResponse.php +++ b/lib/OpenCloud/DNS/Resource/AsyncResponse.php @@ -118,7 +118,6 @@ public function waitFor($state = null, $timeout = null, $callback = null, $inter $states = array('ERROR', $state); while ($continue) { - $body = $this->getClient()->get($jobUrl)->send()->json(); if ($callback) { diff --git a/lib/OpenCloud/DNS/Resource/Domain.php b/lib/OpenCloud/DNS/Resource/Domain.php index 9a3f7e004..cdd8ef28e 100644 --- a/lib/OpenCloud/DNS/Resource/Domain.php +++ b/lib/OpenCloud/DNS/Resource/Domain.php @@ -224,7 +224,6 @@ protected function createJson() // add records, if any if (count($this->records)) { - $recordsObject = (object) array('records' => array()); foreach ($this->records as $record) { @@ -241,7 +240,6 @@ protected function createJson() // add subdomains, if any if (count($this->subdomains)) { - $subdomainsObject = (object) array('domains' => array()); foreach ($this->subdomains as $subdomain) { diff --git a/lib/OpenCloud/Database/Resource/Datastore.php b/lib/OpenCloud/Database/Resource/Datastore.php index dadfe2915..3123fc740 100644 --- a/lib/OpenCloud/Database/Resource/Datastore.php +++ b/lib/OpenCloud/Database/Resource/Datastore.php @@ -36,7 +36,7 @@ class Datastore extends PersistentResource protected static $url_resource = 'datastores'; protected $associatedCollections = array( - 'version' => 'DatastoreVersion' + 'version' => 'DatastoreVersion' ); /** diff --git a/lib/OpenCloud/Identity/Constants/User.php b/lib/OpenCloud/Identity/Constants/User.php index efa58f085..2d944d4ab 100644 --- a/lib/OpenCloud/Identity/Constants/User.php +++ b/lib/OpenCloud/Identity/Constants/User.php @@ -19,7 +19,6 @@ class User { - const MODE_NAME = 'name'; const MODE_EMAIL = 'email'; const MODE_ID = 'id'; diff --git a/lib/OpenCloud/Identity/Service.php b/lib/OpenCloud/Identity/Service.php index d0f3064e4..9c90d2811 100644 --- a/lib/OpenCloud/Identity/Service.php +++ b/lib/OpenCloud/Identity/Service.php @@ -31,7 +31,6 @@ */ class Service extends AbstractService { - /** * Factory method which allows for easy service creation * diff --git a/lib/OpenCloud/Image/Resource/Image.php b/lib/OpenCloud/Image/Resource/Image.php index a10a4e12e..b8ab7407c 100644 --- a/lib/OpenCloud/Image/Resource/Image.php +++ b/lib/OpenCloud/Image/Resource/Image.php @@ -50,7 +50,6 @@ public function update(array $params, Schema $schema = null) $document = new JsonDocument(); foreach ($params as $propertyName => $value) { - // find property object if (!($property = $schema->getProperty($propertyName))) { // check whether additional properties are found diff --git a/lib/OpenCloud/Image/Resource/JsonPatch/Operation.php b/lib/OpenCloud/Image/Resource/JsonPatch/Operation.php index e5845c46c..583e4ee9f 100644 --- a/lib/OpenCloud/Image/Resource/JsonPatch/Operation.php +++ b/lib/OpenCloud/Image/Resource/JsonPatch/Operation.php @@ -75,7 +75,7 @@ public static function factory(Schema $schema, Property $property, $operationTyp */ public function setType($type) { - $this->type = $type; + $this->type = $type; } /** diff --git a/lib/OpenCloud/ObjectStore/Resource/Container.php b/lib/OpenCloud/ObjectStore/Resource/Container.php index 8049a2c3c..3f47c2227 100644 --- a/lib/OpenCloud/ObjectStore/Resource/Container.php +++ b/lib/OpenCloud/ObjectStore/Resource/Container.php @@ -441,7 +441,6 @@ public function uploadObjects(array $files, array $commonHeaders = array()) $requests = $entities = array(); foreach ($files as $entity) { - if (empty($entity['name'])) { throw new Exceptions\InvalidArgumentError('You must provide a name.'); } diff --git a/lib/OpenCloud/ObjectStore/Upload/ConcurrentTransfer.php b/lib/OpenCloud/ObjectStore/Upload/ConcurrentTransfer.php index f011e4569..d0a58f736 100644 --- a/lib/OpenCloud/ObjectStore/Upload/ConcurrentTransfer.php +++ b/lib/OpenCloud/ObjectStore/Upload/ConcurrentTransfer.php @@ -36,13 +36,11 @@ public function transfer() $parts = $this->collectParts($workers); while ($this->transferState->count() < $totalParts) { - $completedParts = $this->transferState->count(); $requests = array(); // Iterate over number of workers until total completed parts is what we need it to be for ($i = 0; $i < $workers && ($completedParts + $i) < $totalParts; $i++) { - // Offset is the current pointer multiplied by the standard chunk length $offset = ($completedParts + $i) * $this->partSize; $parts[$i]->setOffset($offset); diff --git a/lib/OpenCloud/ObjectStore/Upload/ConsecutiveTransfer.php b/lib/OpenCloud/ObjectStore/Upload/ConsecutiveTransfer.php index acd13c519..50196802d 100644 --- a/lib/OpenCloud/ObjectStore/Upload/ConsecutiveTransfer.php +++ b/lib/OpenCloud/ObjectStore/Upload/ConsecutiveTransfer.php @@ -29,11 +29,9 @@ */ class ConsecutiveTransfer extends AbstractTransfer { - public function transfer() { while (!$this->entityBody->isConsumed()) { - if ($this->entityBody->getContentLength() && $this->entityBody->isSeekable()) { // Stream directly from the data $body = new ReadLimitEntityBody($this->entityBody, $this->partSize, $this->entityBody->ftell()); diff --git a/lib/OpenCloud/ObjectStore/Upload/DirectorySync.php b/lib/OpenCloud/ObjectStore/Upload/DirectorySync.php index 0e5a77e3e..b95475bf3 100644 --- a/lib/OpenCloud/ObjectStore/Upload/DirectorySync.php +++ b/lib/OpenCloud/ObjectStore/Upload/DirectorySync.php @@ -112,7 +112,6 @@ public function execute() // Handle PUT requests (create/update files) foreach ($localFiles as $filename) { - $callback = $this->getCallback($filename); $filePath = rtrim($this->basePath, '/') . '/' . $filename; diff --git a/lib/OpenCloud/OpenStack.php b/lib/OpenCloud/OpenStack.php index c0a415877..0ab054eef 100644 --- a/lib/OpenCloud/OpenStack.php +++ b/lib/OpenCloud/OpenStack.php @@ -123,7 +123,6 @@ public function setToken($token) $identity = IdentityService::factory($this); if (is_string($token)) { - if (!$this->token) { $this->setTokenObject($identity->resource('Token')); } @@ -198,7 +197,6 @@ public function setTenant($tenant) $identity = IdentityService::factory($this); if (is_numeric($tenant)) { - if (!$this->tenant) { $this->setTenantObject($identity->resource('Tenant')); } @@ -306,7 +304,6 @@ public function hasExpired() public function getCredentials() { if (!empty($this->secret['username']) && !empty($this->secret['password'])) { - $credentials = array('auth' => array( 'passwordCredentials' => array( 'username' => $this->secret['username'], diff --git a/lib/OpenCloud/Orchestration/Service.php b/lib/OpenCloud/Orchestration/Service.php index a1acb2559..81c1a3e53 100644 --- a/lib/OpenCloud/Orchestration/Service.php +++ b/lib/OpenCloud/Orchestration/Service.php @@ -147,7 +147,7 @@ public function getBuildInfo() { $buildInfo = $this->resource('BuildInfo'); $buildInfo->refresh(); - return $buildInfo; + return $buildInfo; } /** diff --git a/lib/OpenCloud/Queues/Resource/Claim.php b/lib/OpenCloud/Queues/Resource/Claim.php index fbc338467..fcb6ad9c1 100644 --- a/lib/OpenCloud/Queues/Resource/Claim.php +++ b/lib/OpenCloud/Queues/Resource/Claim.php @@ -25,7 +25,6 @@ */ class Claim extends PersistentObject { - const LIMIT_DEFAULT = 10; const GRACE_DEFAULT = 43200; const TTL_DEFAULT = 43200; diff --git a/lib/OpenCloud/Queues/Resource/Message.php b/lib/OpenCloud/Queues/Resource/Message.php index 38ea3e775..f1164717f 100644 --- a/lib/OpenCloud/Queues/Resource/Message.php +++ b/lib/OpenCloud/Queues/Resource/Message.php @@ -28,7 +28,6 @@ */ class Message extends PersistentObject { - /** * @var string */ diff --git a/lib/OpenCloud/Queues/Resource/Queue.php b/lib/OpenCloud/Queues/Resource/Queue.php index ea367e682..0a65723e9 100644 --- a/lib/OpenCloud/Queues/Resource/Queue.php +++ b/lib/OpenCloud/Queues/Resource/Queue.php @@ -211,7 +211,6 @@ public function createMessages(array $messages) ->send(); if (null !== ($location = $response->getHeader('Location'))) { - $parts = array_merge($this->getUrl()->getParts(), parse_url($location)); $url = Url::factory(Url::buildUrl($parts)); diff --git a/lib/OpenCloud/Rackspace.php b/lib/OpenCloud/Rackspace.php index d657f37b1..8480a0d71 100644 --- a/lib/OpenCloud/Rackspace.php +++ b/lib/OpenCloud/Rackspace.php @@ -54,7 +54,6 @@ public function getCredentials() $secret = $this->getSecret(); if (!empty($secret['username']) && !empty($secret['apiKey'])) { - $credentials = array('auth' => array( 'RAX-KSKEY:apiKeyCredentials' => array( 'username' => $secret['username'], diff --git a/samples/Compute/attach_volume.php b/samples/Compute/attach_volume.php index 7353e3aa6..cd7625150 100644 --- a/samples/Compute/attach_volume.php +++ b/samples/Compute/attach_volume.php @@ -57,4 +57,4 @@ // Specifying null will auto-assign the block. You also can be specific - '/dev/xvdb' $mountPoint = null; -$myServer->attachVolume($myVolume, $mountPoint); \ No newline at end of file +$myServer->attachVolume($myVolume, $mountPoint); diff --git a/samples/Compute/create_network.php b/samples/Compute/create_network.php index ea19005b7..002023486 100644 --- a/samples/Compute/create_network.php +++ b/samples/Compute/create_network.php @@ -45,4 +45,4 @@ $network->create(array( 'label' => 'Backend Network', 'cidr' => '192.168.0.0/16' -)); \ No newline at end of file +)); diff --git a/samples/Compute/create_new_keypair.php b/samples/Compute/create_new_keypair.php index 83f14a5a1..9b8fa62f1 100644 --- a/samples/Compute/create_new_keypair.php +++ b/samples/Compute/create_new_keypair.php @@ -49,4 +49,4 @@ $sshPrivateKeyFilename = 'new_keypair_private'; $privateKey = $keypair->getPrivateKey(); file_put_contents($sshPrivateKeyFilename, $privateKey); -chmod($sshPrivateKeyFilename, 0600); \ No newline at end of file +chmod($sshPrivateKeyFilename, 0600); diff --git a/samples/Compute/create_server.php b/samples/Compute/create_server.php index 9dd118b2a..682a2478f 100644 --- a/samples/Compute/create_server.php +++ b/samples/Compute/create_server.php @@ -81,4 +81,4 @@ $body = json_decode($response->getBody(true)); // THIS IS YOUR ROOT PASSWORD - DO NOT LOSE! -$password = $body->server->adminPass; \ No newline at end of file +$password = $body->server->adminPass; diff --git a/samples/Compute/create_server_from_bootable_volume.php b/samples/Compute/create_server_from_bootable_volume.php index 65d822086..73ab9251e 100644 --- a/samples/Compute/create_server_from_bootable_volume.php +++ b/samples/Compute/create_server_from_bootable_volume.php @@ -66,4 +66,4 @@ // No! Something failed. Let's find out: echo $e->getRequest() . PHP_EOL . PHP_EOL; echo $e->getResponse(); -} \ No newline at end of file +} diff --git a/samples/Compute/create_server_from_bootable_volume_delete_on_termination.php b/samples/Compute/create_server_from_bootable_volume_delete_on_termination.php index 923b4339d..f8fd85bbf 100644 --- a/samples/Compute/create_server_from_bootable_volume_delete_on_termination.php +++ b/samples/Compute/create_server_from_bootable_volume_delete_on_termination.php @@ -68,4 +68,4 @@ // No! Something failed. Let's find out: echo $e->getRequest() . PHP_EOL . PHP_EOL; echo $e->getResponse(); -} \ No newline at end of file +} diff --git a/samples/Compute/create_server_with_keypair.php b/samples/Compute/create_server_with_keypair.php index a6a4dc285..65898e657 100644 --- a/samples/Compute/create_server_with_keypair.php +++ b/samples/Compute/create_server_with_keypair.php @@ -80,4 +80,4 @@ $badResponse->getBody(true), implode(', ', $response->getHeaderLines()) ); -} \ No newline at end of file +} diff --git a/samples/Compute/create_volume.php b/samples/Compute/create_volume.php index ffd334928..d4e827388 100644 --- a/samples/Compute/create_volume.php +++ b/samples/Compute/create_volume.php @@ -60,4 +60,4 @@ 'volume_type' => $volumeType, 'display_name' => 'My Volume', 'display_description' => 'Used for large object storage' -)); \ No newline at end of file +)); diff --git a/samples/Compute/delete_server.php b/samples/Compute/delete_server.php index 6e49f8971..ba78d4524 100644 --- a/samples/Compute/delete_server.php +++ b/samples/Compute/delete_server.php @@ -46,4 +46,4 @@ $server = $service->server($serverId); // 4. Delete it -$server->delete(); \ No newline at end of file +$server->delete(); diff --git a/samples/Compute/detach_volume.php b/samples/Compute/detach_volume.php index c69a5e4e7..0edb057f3 100644 --- a/samples/Compute/detach_volume.php +++ b/samples/Compute/detach_volume.php @@ -54,4 +54,4 @@ $myServer = $computeService->server($serverId); // 5. Detach -$myServer->detachVolume($myVolume); \ No newline at end of file +$myServer->detachVolume($myVolume); diff --git a/samples/Compute/update_server.php b/samples/Compute/update_server.php index 9c7785d94..558ec979b 100644 --- a/samples/Compute/update_server.php +++ b/samples/Compute/update_server.php @@ -49,4 +49,4 @@ // `accessIPv4' and `accessIPv6' attributes. $server->update(array( 'name' => 'new_awesome_name' -)); \ No newline at end of file +)); diff --git a/samples/Compute/upload_existing_keypair.php b/samples/Compute/upload_existing_keypair.php index 36d3385d1..d2886680d 100644 --- a/samples/Compute/upload_existing_keypair.php +++ b/samples/Compute/upload_existing_keypair.php @@ -46,4 +46,4 @@ $keypair->create(array( 'name' => 'new_public_key', 'publicKey' => $payload -)); \ No newline at end of file +)); diff --git a/samples/Database/delete-configuration.php b/samples/Database/delete-configuration.php index 43186a580..4fc2d7460 100644 --- a/samples/Database/delete-configuration.php +++ b/samples/Database/delete-configuration.php @@ -41,4 +41,4 @@ $configuration = $databaseService->configuration(getenv('OS_DB_CONFIGURATION_ID')); // 4. Delete it. -$configuration->delete(); \ No newline at end of file +$configuration->delete(); diff --git a/samples/ObjectStore/delete-container-recursive.php b/samples/ObjectStore/delete-container-recursive.php index 54adac208..fa0724583 100644 --- a/samples/ObjectStore/delete-container-recursive.php +++ b/samples/ObjectStore/delete-container-recursive.php @@ -41,4 +41,4 @@ $container = $objectStoreService->getContainer('logos'); // 4. Delete container. -$container->delete(true); \ No newline at end of file +$container->delete(true); diff --git a/samples/ObjectStore/delete-container.php b/samples/ObjectStore/delete-container.php index ec8d68287..2f120d44d 100644 --- a/samples/ObjectStore/delete-container.php +++ b/samples/ObjectStore/delete-container.php @@ -42,4 +42,4 @@ $container = $objectStoreService->getContainer('logos'); // 4. Delete container. -$container->delete(); \ No newline at end of file +$container->delete(); diff --git a/samples/ObjectStore/delete-object.php b/samples/ObjectStore/delete-object.php index bd5f92ef8..7d3383d3e 100644 --- a/samples/ObjectStore/delete-object.php +++ b/samples/ObjectStore/delete-object.php @@ -47,4 +47,4 @@ $object = $container->getObject($objectName); // 5. Delete object. -$object->delete(); \ No newline at end of file +$object->delete(); diff --git a/samples/ObjectStore/get-account-bytes-used.php b/samples/ObjectStore/get-account-bytes-used.php index cefccf89c..62a728b9e 100644 --- a/samples/ObjectStore/get-account-bytes-used.php +++ b/samples/ObjectStore/get-account-bytes-used.php @@ -40,4 +40,4 @@ // 4. Get the space (in bytes) used by the account. $accountSizeInBytes = $account->getBytesUsed(); -printf("Space (in bytes) used by this account: %d\n", $accountSizeInBytes); \ No newline at end of file +printf("Space (in bytes) used by this account: %d\n", $accountSizeInBytes); diff --git a/samples/ObjectStore/get-account-container-count.php b/samples/ObjectStore/get-account-container-count.php index dfc3a574b..3f43adf1c 100644 --- a/samples/ObjectStore/get-account-container-count.php +++ b/samples/ObjectStore/get-account-container-count.php @@ -40,4 +40,4 @@ // 4. Get the number of containers in the account. $accountContainerCount = $account->getContainerCount(); -printf("# of containers in account: %d\n", $accountContainerCount); \ No newline at end of file +printf("# of containers in account: %d\n", $accountContainerCount); diff --git a/samples/ObjectStore/get-account-object-count.php b/samples/ObjectStore/get-account-object-count.php index 4092006cc..a8529c5bd 100644 --- a/samples/ObjectStore/get-account-object-count.php +++ b/samples/ObjectStore/get-account-object-count.php @@ -40,4 +40,4 @@ // 4. Get the number of objects in the account. $accountObjectCount = $account->getObjectCount(); -printf("# of objects in account: %d\n", $accountObjectCount); \ No newline at end of file +printf("# of objects in account: %d\n", $accountObjectCount); diff --git a/samples/ObjectStore/get-account-temp-url-secret.php b/samples/ObjectStore/get-account-temp-url-secret.php index 1e69608a5..027222c45 100644 --- a/samples/ObjectStore/get-account-temp-url-secret.php +++ b/samples/ObjectStore/get-account-temp-url-secret.php @@ -41,4 +41,4 @@ // 4. Get the temporary URL secret. $tempUrlSecret = $account->getTempUrlSecret(); -printf("Account temporary URL secret: %s\n", $tempUrlSecret); \ No newline at end of file +printf("Account temporary URL secret: %s\n", $tempUrlSecret); diff --git a/samples/ObjectStore/get-container-bytes-quota.php b/samples/ObjectStore/get-container-bytes-quota.php index 960f2f43d..dd9cc1c45 100644 --- a/samples/ObjectStore/get-container-bytes-quota.php +++ b/samples/ObjectStore/get-container-bytes-quota.php @@ -42,4 +42,4 @@ // 4. Get the quota for total size of objects in container. $maximumTotalSizeOfObjectsAllowedInContainer = $container->getBytesQuota(); -printf("Total size of objects allowed in container: %d\n", $maximumTotalSizeOfObjectsAllowedInContainer); \ No newline at end of file +printf("Total size of objects allowed in container: %d\n", $maximumTotalSizeOfObjectsAllowedInContainer); diff --git a/samples/ObjectStore/get-container-bytes-used.php b/samples/ObjectStore/get-container-bytes-used.php index 5e6345e53..c82b92dbd 100644 --- a/samples/ObjectStore/get-container-bytes-used.php +++ b/samples/ObjectStore/get-container-bytes-used.php @@ -42,4 +42,4 @@ // 4. Get the space (in bytes) used by this container. $containerSizeInBytes = $container->getBytesUsed(); -printf("Space (in bytes) used by this container: %d\n", $containerSizeInBytes); \ No newline at end of file +printf("Space (in bytes) used by this container: %d\n", $containerSizeInBytes); diff --git a/samples/ObjectStore/get-container-count-quota.php b/samples/ObjectStore/get-container-count-quota.php index 8f93b954c..8485f0639 100644 --- a/samples/ObjectStore/get-container-count-quota.php +++ b/samples/ObjectStore/get-container-count-quota.php @@ -42,4 +42,4 @@ // 4. Get the quota for number of objects in container. $maximumNumberOfObjectsAllowedInContainer = $container->getCountQuota(); -printf("Number of objects allowed in container: %d\n", $maximumNumberOfObjectsAllowedInContainer); \ No newline at end of file +printf("Number of objects allowed in container: %d\n", $maximumNumberOfObjectsAllowedInContainer); diff --git a/samples/ObjectStore/get-container-object-count.php b/samples/ObjectStore/get-container-object-count.php index b4ce66039..46d797c7c 100644 --- a/samples/ObjectStore/get-container-object-count.php +++ b/samples/ObjectStore/get-container-object-count.php @@ -42,4 +42,4 @@ // 4. Get the number of objects in this container. $containerObjectCount = $container->getObjectCount(); -printf("# of objects in container: %d\n", $containerObjectCount); \ No newline at end of file +printf("# of objects in container: %d\n", $containerObjectCount); diff --git a/samples/ObjectStore/get-object.php b/samples/ObjectStore/get-object.php index 23004dbf2..666f7ad16 100644 --- a/samples/ObjectStore/get-object.php +++ b/samples/ObjectStore/get-object.php @@ -59,4 +59,4 @@ $localFilename = tempnam("/tmp", 'php-opencloud-'); file_put_contents($localFilename, $stream); -printf("Your object has been written to %s\n", $localFilename); \ No newline at end of file +printf("Your object has been written to %s\n", $localFilename); diff --git a/samples/ObjectStore/list-containers.php b/samples/ObjectStore/list-containers.php index 0c31e16b1..9c6f4af1e 100644 --- a/samples/ObjectStore/list-containers.php +++ b/samples/ObjectStore/list-containers.php @@ -40,4 +40,4 @@ foreach ($containers as $container) { /** @var $container OpenCloud\ObjectStore\Resource\Container **/ printf("Container name: %s\n", $container->getName()); -} \ No newline at end of file +} diff --git a/samples/ObjectStore/quickstart.php b/samples/ObjectStore/quickstart.php index ef5147bca..0536e9c90 100644 --- a/samples/ObjectStore/quickstart.php +++ b/samples/ObjectStore/quickstart.php @@ -43,4 +43,4 @@ $remoteFileName = 'php-elephant.jpg'; $fileData = fopen($localFileName, 'r'); -$container->uploadObject($remoteFileName, $fileData); \ No newline at end of file +$container->uploadObject($remoteFileName, $fileData); diff --git a/samples/ObjectStore/set-container-count-quota.php b/samples/ObjectStore/set-container-count-quota.php index cb07d316b..1867eb7d2 100644 --- a/samples/ObjectStore/set-container-count-quota.php +++ b/samples/ObjectStore/set-container-count-quota.php @@ -42,4 +42,4 @@ // 4. Set quota for number of objects in container. $maximumNumberOfObjectsAllowedInContainer = 25; -$container->setCountQuota($maximumNumberOfObjectsAllowedInContainer); \ No newline at end of file +$container->setCountQuota($maximumNumberOfObjectsAllowedInContainer); diff --git a/samples/ObjectStore/set-container-metadata.php b/samples/ObjectStore/set-container-metadata.php index c91baa8a8..ac6e6669e 100644 --- a/samples/ObjectStore/set-container-metadata.php +++ b/samples/ObjectStore/set-container-metadata.php @@ -43,4 +43,4 @@ // 4. Set container metadata. $container->saveMetadata(array( 'author' => 'John Doe' -)); \ No newline at end of file +)); diff --git a/samples/ObjectStore/upload-large-object.php b/samples/ObjectStore/upload-large-object.php index a236f3e29..69e24d66c 100644 --- a/samples/ObjectStore/upload-large-object.php +++ b/samples/ObjectStore/upload-large-object.php @@ -47,4 +47,4 @@ 'path' => getenv('LARGE_FILE_PATH') ); $objectTransfer = $container->setupObjectTransfer($options); -$objectTransfer->upload(); \ No newline at end of file +$objectTransfer->upload(); diff --git a/samples/ObjectStore/upload-multiple-objects.php b/samples/ObjectStore/upload-multiple-objects.php index ff44ea287..08787bc16 100644 --- a/samples/ObjectStore/upload-multiple-objects.php +++ b/samples/ObjectStore/upload-multiple-objects.php @@ -52,4 +52,4 @@ ) ); -$container->uploadObjects($objects); \ No newline at end of file +$container->uploadObjects($objects); diff --git a/samples/Volume/list-snapshots.php b/samples/Volume/list-snapshots.php index fe4d1a7d4..9e2db32fc 100644 --- a/samples/Volume/list-snapshots.php +++ b/samples/Volume/list-snapshots.php @@ -20,7 +20,7 @@ // * Prior to running this script, you must setup the following environment variables: // * RAX_USERNAME: Your Rackspace Cloud Account Username, and // * RAX_API_KEY: Your Rackspace Cloud Account API Key -// * RAX_VOLUME_ID: ID of the volume whose snapshots you want to list. Run +// * RAX_VOLUME_ID: ID of the volume whose snapshots you want to list. Run // create-volume.php if you need to create one first. // diff --git a/samples/Volume/list-volumes.php b/samples/Volume/list-volumes.php index 43c88d8d6..5a18b6ca5 100644 --- a/samples/Volume/list-volumes.php +++ b/samples/Volume/list-volumes.php @@ -40,4 +40,4 @@ foreach ($volumes as $volume) { /** @var $volume OpenCloud\Volume\Resource\Volume **/ echo "ID: " . $volume->id() . " | " . "Name: " . $volume->name() . PHP_EOL; -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Smoke/Enum.php b/tests/OpenCloud/Smoke/Enum.php index d464051f0..a25b1386c 100644 --- a/tests/OpenCloud/Smoke/Enum.php +++ b/tests/OpenCloud/Smoke/Enum.php @@ -28,12 +28,11 @@ /** * Description of Enum - * - * @link + * + * @link */ class Enum { - const USER_AGENT = 'PHP OpenCloud SMOKETEST'; const CREDS_FILENAME = '.smoketestCredentials'; @@ -55,5 +54,4 @@ class Enum const DISPLAY_ITER_LIMIT = 10; const DIVIDER = '-------------'; - } diff --git a/tests/OpenCloud/Smoke/Logger.php b/tests/OpenCloud/Smoke/Logger.php index b43053ce8..f1a884b38 100644 --- a/tests/OpenCloud/Smoke/Logger.php +++ b/tests/OpenCloud/Smoke/Logger.php @@ -22,11 +22,9 @@ class Logger extends AbstractLogger { - public function log($level, $message, array $context = array()) { $logger = new CommonLogger(); return $logger->log($level, $message, $context); } - } diff --git a/tests/OpenCloud/Smoke/Runner.php b/tests/OpenCloud/Smoke/Runner.php index a387c6c99..073e1c376 100644 --- a/tests/OpenCloud/Smoke/Runner.php +++ b/tests/OpenCloud/Smoke/Runner.php @@ -30,8 +30,8 @@ class Runner { /** * These are the individual tests, or units, that can execute. - * - * @var array + * + * @var array */ private $units = array( 'Autoscale', @@ -90,7 +90,7 @@ private function formatDuration($duration) } private function handleArguments() - { + { $options = getopt('D::H::E::I::A', array( 'debug::', 'help::', @@ -174,7 +174,6 @@ public function executeTemplate() $client = $this->createClient(); foreach ($this->included as $unit) { - $class = __NAMESPACE__ . '\\Unit\\' . $unit; if (!class_exists($class)) { @@ -197,10 +196,10 @@ public function executeTemplate() private function createClient() { - Utils::log('Authenticate'); + Utils::log('Authenticate'); $secret = array( - 'username' => Utils::getEnvVar(Enum::ENV_USERNAME), + 'username' => Utils::getEnvVar(Enum::ENV_USERNAME), 'apiKey' => Utils::getEnvVar(Enum::ENV_API_KEY) ); @@ -223,7 +222,6 @@ private function createClient() return $client; } - } require __DIR__ . '/../../bootstrap.php'; diff --git a/tests/OpenCloud/Smoke/SmokeException.php b/tests/OpenCloud/Smoke/SmokeException.php index 107af2318..ed7953d90 100644 --- a/tests/OpenCloud/Smoke/SmokeException.php +++ b/tests/OpenCloud/Smoke/SmokeException.php @@ -30,8 +30,8 @@ /** * Description of SmokeException - * - * @link + * + * @link */ class SmokeException extends Exception { diff --git a/tests/OpenCloud/Smoke/Step.php b/tests/OpenCloud/Smoke/Step.php index 8744c19b8..9009e5026 100644 --- a/tests/OpenCloud/Smoke/Step.php +++ b/tests/OpenCloud/Smoke/Step.php @@ -28,8 +28,8 @@ /** * Description of Step - * - * @link + * + * @link */ class Step { @@ -43,7 +43,7 @@ class Step public $message; /** - * @var string Either default, `spacer` or `dotter`. + * @var string Either default, `spacer` or `dotter`. */ public $outputType; @@ -58,7 +58,7 @@ class Step public $depth = 0; /** - * @var int The count for this step. + * @var int The count for this step. */ public $count = 1; @@ -136,7 +136,7 @@ public function getOutput() switch ($this->getOutputType()) { default: $leadingLine = true; - $outputString = sprintf('%d. %s', $this->getCount(), $this->getMessage()); + $outputString = sprintf('%d. %s', $this->getCount(), $this->getMessage()); break; case self::TYPE_DOTTER: $outputString = sprintf('... %s', $this->getMessage()); @@ -146,9 +146,9 @@ public function getOutput() break; } - return ((isset($leadingLine)) ? PHP_EOL : '') + return ((isset($leadingLine)) ? PHP_EOL : '') . $this->computeSpacePrefix() . $outputString; - } + } private function computeSpacePrefix() { @@ -198,5 +198,4 @@ public function createSubStep($string, $outputType = null) ->setCount($this->getCount() + 1) ->output(); } - } diff --git a/tests/OpenCloud/Smoke/Unit/AbstractUnit.php b/tests/OpenCloud/Smoke/Unit/AbstractUnit.php index aa2ac945f..bdf9d2e58 100644 --- a/tests/OpenCloud/Smoke/Unit/AbstractUnit.php +++ b/tests/OpenCloud/Smoke/Unit/AbstractUnit.php @@ -25,29 +25,29 @@ /** * Description of AbstractUnit - * - * @link + * + * @link */ abstract class AbstractUnit { /** * The credentials cache filename. - * - * @var string + * + * @var string */ private $credentialsCacheFile; /** * The connection object which everything routes through. - * + * * @var OpenCloud\OpenStack */ protected $connection; /** * The particular service that each unit uses. - * - * @var OpenCloud\Common\Service + * + * @var OpenCloud\Common\Service */ protected $service; @@ -57,9 +57,9 @@ abstract class AbstractUnit protected $includedUnits; /** - * Factory method for instantiating the unit object, and executing its + * Factory method for instantiating the unit object, and executing its * main algorithm. - * + * * @return UnitInterface */ public static function factory(OpenStack $connection, array $includedUnits) @@ -118,9 +118,10 @@ public function getIncludedUnits() public function getWaiterCallback() { - return function($object) { + return function ($object) { if (!empty($object->error)) { - var_dump($object->error); die; + var_dump($object->error); + die; } else { $this->stepInfoDotter( "Waiting on %s/%-12s %4s%%", diff --git a/tests/OpenCloud/Smoke/Unit/Autoscale.php b/tests/OpenCloud/Smoke/Unit/Autoscale.php index f470437aa..10e44e7ad 100644 --- a/tests/OpenCloud/Smoke/Unit/Autoscale.php +++ b/tests/OpenCloud/Smoke/Unit/Autoscale.php @@ -19,13 +19,11 @@ class Autoscale extends AbstractUnit implements UnitInterface { - /** * {@inheritDoc} */ public function setupService() { - } /** @@ -33,7 +31,6 @@ public function setupService() */ public function main() { - } /** @@ -41,7 +38,5 @@ public function main() */ public function teardown() { - } - } diff --git a/tests/OpenCloud/Smoke/Unit/CloudMonitoring.php b/tests/OpenCloud/Smoke/Unit/CloudMonitoring.php index 2bf609d70..9f08cc6e0 100644 --- a/tests/OpenCloud/Smoke/Unit/CloudMonitoring.php +++ b/tests/OpenCloud/Smoke/Unit/CloudMonitoring.php @@ -21,8 +21,8 @@ /** * Description of CloudMonitoring - * - * @link + * + * @link */ class CloudMonitoring extends AbstractUnit implements UnitInterface { diff --git a/tests/OpenCloud/Smoke/Unit/Compute.php b/tests/OpenCloud/Smoke/Unit/Compute.php index a288d68e3..78083392a 100644 --- a/tests/OpenCloud/Smoke/Unit/Compute.php +++ b/tests/OpenCloud/Smoke/Unit/Compute.php @@ -24,8 +24,8 @@ /** * Description of Compute - * - * @link + * + * @link */ class Compute extends AbstractUnit implements UnitInterface { @@ -66,7 +66,7 @@ public function main() $network = $this->getService()->network(); try { $network->create(array( - 'label' => $this->prepend(self::NETWORK_NAME), + 'label' => $this->prepend(self::NETWORK_NAME), 'cidr' => '192.168.0.0/24' )); } catch (ClientErrorResponseException $e) { @@ -223,7 +223,6 @@ public function teardown() // Delete servers foreach ($servers as $server) { - $attachments = $server->volumeAttachmentList(); foreach ($attachments as $volumeAttachment) { diff --git a/tests/OpenCloud/Smoke/Unit/DNS.php b/tests/OpenCloud/Smoke/Unit/DNS.php index 0cb22b219..bfc4b95ec 100644 --- a/tests/OpenCloud/Smoke/Unit/DNS.php +++ b/tests/OpenCloud/Smoke/Unit/DNS.php @@ -28,9 +28,10 @@ public function setupService() public function getWaiterCallback() { - return function($object) { + return function ($object) { if (!empty($object->error)) { - var_dump($object->error); die; + var_dump($object->error); + die; } else { $this->stepInfoDotter("Waiting..."); } @@ -61,8 +62,8 @@ public function main() if ($asyncResponse->Status() == 'ERROR') { $this->stepInfo( 'Error: [%d] %s - %s', - $asyncResponse->error->code, - $asyncResponse->error->message, + $asyncResponse->error->code, + $asyncResponse->error->message, $asyncResponse->error->details ); } @@ -75,8 +76,8 @@ public function main() $record = $domain->record(); $asyncResponse = $record->create(array( - 'type' => 'CNAME', - 'ttl' => 600, + 'type' => 'CNAME', + 'ttl' => 600, 'name' => 'www.'. $domainName, 'data' => 'developer.rackspace.com' )); @@ -84,8 +85,8 @@ public function main() if ($asyncResponse->status() == 'ERROR') { $this->stepInfo( - 'Error: [%d] $s - %s', - $asyncResponse->error->code, + 'Error: [%d] $s - %s', + $asyncResponse->error->code, $asyncResponse->error->message, $asyncResponse->error->details ); @@ -103,7 +104,6 @@ public function main() $domains->setOption('limit.total', Enum::DISPLAY_ITER_LIMIT); foreach ($domains as $domain) { - $this->stepInfo('%s [%s]', $domain->name(), $domain->emailAddress); $step = $this->stepInfo('Domain Records:'); @@ -111,9 +111,9 @@ public function main() foreach ($records as $record) { $step->stepInfo( '- %s %d %s %s', - $record->type, - $record->ttl, - $record->name(), + $record->type, + $record->ttl, + $record->name(), $record->data ); } diff --git a/tests/OpenCloud/Smoke/Unit/Database.php b/tests/OpenCloud/Smoke/Unit/Database.php index 3900660b6..c5f76899e 100644 --- a/tests/OpenCloud/Smoke/Unit/Database.php +++ b/tests/OpenCloud/Smoke/Unit/Database.php @@ -94,7 +94,6 @@ public function teardown() $instances = $this->getService()->instanceList(); foreach ($instances as $instance) { - // Users $users = $instance->userList(); foreach ($users as $user) { @@ -113,11 +112,11 @@ public function teardown() } } - // Instance + // Instance if ($this->shouldDelete($instance->name)) { $this->stepInfo('Deleting instance: %s', $instance->id); $instance->delete(); - } + } } } } diff --git a/tests/OpenCloud/Smoke/Unit/Identity.php b/tests/OpenCloud/Smoke/Unit/Identity.php index 4f8a44175..97bd0f571 100644 --- a/tests/OpenCloud/Smoke/Unit/Identity.php +++ b/tests/OpenCloud/Smoke/Unit/Identity.php @@ -128,4 +128,4 @@ public function executeTenants() public function teardown() { } -} +} diff --git a/tests/OpenCloud/Smoke/Unit/LoadBalancer.php b/tests/OpenCloud/Smoke/Unit/LoadBalancer.php index 9d408037f..e7a451c05 100644 --- a/tests/OpenCloud/Smoke/Unit/LoadBalancer.php +++ b/tests/OpenCloud/Smoke/Unit/LoadBalancer.php @@ -68,8 +68,8 @@ public function main() $protocolList = $this->getService()->protocolList(); foreach ($protocolList as $protocol) { $this->stepInfo( - '%s %4d', - substr($protocol->name() . '..................', 0, 20), + '%s %4d', + substr($protocol->name() . '..................', 0, 20), $protocol->port ); } @@ -87,15 +87,13 @@ public function main() $loadBalancers->setOption('limit.total', Enum::DISPLAY_ITER_LIMIT); if ($loadBalancers->count()) { - $i = 1; $total = $loadBalancers->count() > 10 ? 10 : $loadBalancers->count(); foreach ($loadBalancers as $loadBalancer) { - $step = $this->stepInfo('Load balancer (%d/%d)', $i, $total); $step->stepInfo( - 'ID [%s], Name [%s], Status [%s]', + 'ID [%s], Name [%s], Status [%s]', $loadBalancer->id, $loadBalancer->name(), $loadBalancer->status() @@ -109,10 +107,10 @@ public function main() } else { foreach ($nodeList as $node) { $step1->stepInfo('Node: [%s] %s:%d %s/%s', - $node->id(), - $node->address, + $node->id(), + $node->address, $node->port, - $node->condition, + $node->condition, $node->status ); } @@ -126,7 +124,7 @@ public function main() } else { foreach ($nodeEvents as $event) { $step2->stepInfo('Event: %s (%s)', - $event->detailedMessage, + $event->detailedMessage, $event->author ); } @@ -145,8 +143,8 @@ public function main() $metadataList = $loadBalancer->metadataList(); foreach ($metadataList as $metadataItem) { $step3->stepInfo('[Metadata #%s] %s=%s', - $metadataItem->Id(), - $metadataItem->key, + $metadataItem->Id(), + $metadataItem->key, $metadataItem->value ); } @@ -164,7 +162,7 @@ public function main() $this->step('Billable Load Balancers from %s to %s', $start, $end); $list = $this->getService()->billableLoadBalancerList(array( - 'startTime' => $start, + 'startTime' => $start, 'endTime' => $end )); diff --git a/tests/OpenCloud/Smoke/Unit/ObjectStore.php b/tests/OpenCloud/Smoke/Unit/ObjectStore.php index 5ab4a3b0c..74f9ec346 100644 --- a/tests/OpenCloud/Smoke/Unit/ObjectStore.php +++ b/tests/OpenCloud/Smoke/Unit/ObjectStore.php @@ -26,7 +26,6 @@ class ObjectStore extends AbstractUnit implements UnitInterface { - const OBJECT_NAME = 'TestObject'; const UPLOAD_COUNT = 50; const MASSIVE_FILE_PATH = '/tmp/massive.txt'; @@ -132,7 +131,6 @@ public function main() $containers = $this->getService()->listContainers(); foreach ($containers as $container) { - $step = $this->stepInfo('Container: %s', $container->getName()); // List this container's objects @@ -140,7 +138,7 @@ public function main() foreach ($containers as $container) { $step->stepInfo('Object: %s', $object->getName()); } - } + } } public function teardown() @@ -156,7 +154,8 @@ public function teardown() $this->stepInfo('Disable Container CDN'); try { $container->disableCDN(); - } catch (CdnNotAvailableError $e) {} + } catch (CdnNotAvailableError $e) { + } $step = $this->stepInfo('Delete objects'); $objects = $container->objectList(); diff --git a/tests/OpenCloud/Smoke/Unit/Orchestration.php b/tests/OpenCloud/Smoke/Unit/Orchestration.php index 57ee8223b..0b9baa340 100644 --- a/tests/OpenCloud/Smoke/Unit/Orchestration.php +++ b/tests/OpenCloud/Smoke/Unit/Orchestration.php @@ -21,12 +21,11 @@ /** * Description of Orchestration - * - * @link + * + * @link */ class Orchestration extends AbstractUnit implements UnitInterface { - protected $cleanupStackIds = array(); public function setupService() @@ -36,7 +35,6 @@ public function setupService() public function main() { - $this->step('Validate template from a file'); $this->getService()->validateTemplate(array( 'template' => file_get_contents($this->getResourceDir() . '/lamp.yaml') @@ -157,7 +155,7 @@ public function main() $this->step('List resource types'); $resourceTypes = $this->getService()->listResourceTypes(); $this->stepInfo('Resource type'); - $this->stepInfo(str_repeat('-', 40)); + $this->stepInfo(str_repeat('-', 40)); foreach ($resourceTypes as $resourceType) { $this->stepInfo($resourceType->getResourceType()); $lastResourceType = $resourceType->getResourceType(); @@ -176,7 +174,7 @@ public function main() $this->stepInfo('Engine revision: ' . $buildInfo->getEngine()->revision); $this->step('Update stack from template file'); - $stack->waitFor('CREATE_COMPLETE', null, function($s) { + $stack->waitFor('CREATE_COMPLETE', null, function ($s) { $this->stepInfo('Stack is still being created. Waiting...'); }); $stack->update(array( @@ -191,7 +189,7 @@ public function main() $this->step('Abandon stack'); $stack = $this->getService()->getStack('simple-lamp-setup-from-template-url'); - $stack->waitFor('CREATE_COMPLETE', null, function($s) { + $stack->waitFor('CREATE_COMPLETE', null, function ($s) { $this->stepInfo('Stack is still being created. Waiting...'); }); $abandonedStackData = $stack->abandon(); diff --git a/tests/OpenCloud/Smoke/Unit/UnitInterface.php b/tests/OpenCloud/Smoke/Unit/UnitInterface.php index 3e321c67c..214d6c883 100644 --- a/tests/OpenCloud/Smoke/Unit/UnitInterface.php +++ b/tests/OpenCloud/Smoke/Unit/UnitInterface.php @@ -22,7 +22,6 @@ */ interface UnitInterface { - /** * Method for executing the main algorithm of the test. */ @@ -34,9 +33,8 @@ public function main(); public function setupService(); /** - * Allows for the deletion of any persistent resources created during + * Allows for the deletion of any persistent resources created during * execution. */ public function teardown(); - } diff --git a/tests/OpenCloud/Smoke/Unit/Volume.php b/tests/OpenCloud/Smoke/Unit/Volume.php index 020dea9cc..1085f14e9 100644 --- a/tests/OpenCloud/Smoke/Unit/Volume.php +++ b/tests/OpenCloud/Smoke/Unit/Volume.php @@ -21,11 +21,11 @@ /** * Description of Volume - * - * @link + * + * @link */ class Volume extends AbstractUnit implements UnitInterface -{ +{ /** * {@inheritDoc} */ diff --git a/tests/OpenCloud/Smoke/Utils.php b/tests/OpenCloud/Smoke/Utils.php index 2e3394bba..a643d0d86 100644 --- a/tests/OpenCloud/Smoke/Utils.php +++ b/tests/OpenCloud/Smoke/Utils.php @@ -28,15 +28,14 @@ /** * Description of Utils - * - * @link + * + * @link */ class Utils { - /** * Basic logging function. - * + * * @param string $string */ public static function log($string) @@ -53,7 +52,7 @@ public static function convertArgsToString(array $args) } /** - * A logging function similar to sprintf(). Accepts a format string as a + * A logging function similar to sprintf(). Accepts a format string as a * first argument, and an array as a second argument to stock the format. */ public static function logf() @@ -120,5 +119,4 @@ public static function getIdentityEndpoint() return \OpenCloud\Rackspace::US_IDENTITY_ENDPOINT; } } - } diff --git a/tests/OpenCloud/Tests/Autoscale/Resource/GroupTest.php b/tests/OpenCloud/Tests/Autoscale/Resource/GroupTest.php index ddc9e4386..76f898b9c 100644 --- a/tests/OpenCloud/Tests/Autoscale/Resource/GroupTest.php +++ b/tests/OpenCloud/Tests/Autoscale/Resource/GroupTest.php @@ -129,4 +129,4 @@ public function testCreatingScalingPolicies() $this->isResponse($response); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Autoscale/Resource/ScalingPolicyTest.php b/tests/OpenCloud/Tests/Autoscale/Resource/ScalingPolicyTest.php index d9ca24258..d1d16d1e2 100644 --- a/tests/OpenCloud/Tests/Autoscale/Resource/ScalingPolicyTest.php +++ b/tests/OpenCloud/Tests/Autoscale/Resource/ScalingPolicyTest.php @@ -22,7 +22,6 @@ class ScalingPolicyTest extends AutoscaleTestCase { - public function setupObjects() { parent::setupObjects(); diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTest.php index c173c6eab..b38de3db8 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTest.php @@ -21,7 +21,6 @@ class AgentTest extends CloudMonitoringTestCase { - const AGENT_ID = '00-agent.example.com'; const CONNECTION_ID = 'cntl4qsIbA'; diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTokenTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTokenTest.php index c6729aa87..c25636773 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTokenTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AgentTokenTest.php @@ -21,7 +21,6 @@ class AgentTokenTest extends OpenCloudTestCase { - const TOKEN_ID = 'someId'; public function setupObjects() diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AlarmTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AlarmTest.php index 44a71f207..a2a6c72dd 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/AlarmTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/AlarmTest.php @@ -21,7 +21,6 @@ class AlarmTest extends CloudMonitoringTestCase { - const ENTITY_ID = 'en5hw56rAh'; const ALARM_ID = 'alAAAA'; diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ChangelogTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ChangelogTest.php index 7d40ec752..c07621e22 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ChangelogTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ChangelogTest.php @@ -19,7 +19,6 @@ class ChangelogTest extends CloudMonitoringTestCase { - const NT_ID = 'webhook'; public function setupObjects() diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/CheckTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/CheckTest.php index 812c657d9..f2f9ada0b 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/CheckTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/CheckTest.php @@ -22,7 +22,6 @@ class CheckTest extends CloudMonitoringTestCase { - public function setupObjects() { parent::setupObjects(); diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/EntityTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/EntityTest.php index b9c36b70f..b1ea5e34f 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/EntityTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/EntityTest.php @@ -21,7 +21,6 @@ class EntityTest extends CloudMonitoringTestCase { - public function testResourceClass() { $this->assertInstanceOf('OpenCloud\CloudMonitoring\Resource\Entity', $this->entity); diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/MetricTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/MetricTest.php index bc0b7a4f5..06a75a608 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/MetricTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/MetricTest.php @@ -21,7 +21,6 @@ class MetricTest extends CloudMonitoringTestCase { - const CHECK_ID = 'chAAAA'; const METRIC_NAME = 'mzdfw.available'; diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationHistoryTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationHistoryTest.php index cdff81645..f5bdef5d4 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationHistoryTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationHistoryTest.php @@ -21,7 +21,6 @@ class NotificationHistoryTest extends CloudMonitoringTestCase { - const ENTITY_ID = 'enAAAAA'; const ALARM_ID = 'alAAAA'; const CHECK_ID = 'chAAAA'; diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationPlanTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationPlanTest.php index 0619e6372..c3f39b5d3 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationPlanTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationPlanTest.php @@ -22,7 +22,6 @@ class NotificationPlanTest extends CloudMonitoringTestCase { - const NP_ID = 'npAAAA'; public function setupObjects() diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTest.php index 1d207d986..05701e232 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTest.php @@ -22,7 +22,6 @@ class NotificationTest extends CloudMonitoringTestCase { - const NOTIFICATION_ID = 'ntAAAA'; public function setupObjects() diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTypeTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTypeTest.php index eb5f8bc39..ab1d39c18 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTypeTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/NotificationTypeTest.php @@ -22,7 +22,6 @@ class NotificationTypeTest extends CloudMonitoringTestCase { - const NT_ID = 'webhook'; public function setupObjects() diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ViewTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ViewTest.php index 3a5c61624..40eb6abe0 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ViewTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ViewTest.php @@ -21,7 +21,6 @@ class ViewTest extends CloudMonitoringTestCase { - public function setupObjects() { $this->service = $this->getClient()->cloudMonitoringService(); diff --git a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ZoneTest.php b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ZoneTest.php index f292a2519..20ef87a53 100644 --- a/tests/OpenCloud/Tests/CloudMonitoring/Resource/ZoneTest.php +++ b/tests/OpenCloud/Tests/CloudMonitoring/Resource/ZoneTest.php @@ -22,7 +22,6 @@ class ZoneTest extends CloudMonitoringTestCase { - public function setupObjects() { $this->service = $this->getClient()->cloudMonitoringService(); diff --git a/tests/OpenCloud/Tests/Common/BaseTest.php b/tests/OpenCloud/Tests/Common/BaseTest.php index dce924db6..c0a1c44ea 100644 --- a/tests/OpenCloud/Tests/Common/BaseTest.php +++ b/tests/OpenCloud/Tests/Common/BaseTest.php @@ -22,7 +22,6 @@ class MyBase extends Base { - public $foo; protected $bar; private $baz; @@ -41,7 +40,6 @@ public function getBar() class BaseTest extends \OpenCloud\Tests\OpenCloudTestCase { - private $my; public function setupObjects() diff --git a/tests/OpenCloud/Tests/Common/Collection/ArrayCollectionTest.php b/tests/OpenCloud/Tests/Common/Collection/ArrayCollectionTest.php index a50722dd1..150bc961b 100644 --- a/tests/OpenCloud/Tests/Common/Collection/ArrayCollectionTest.php +++ b/tests/OpenCloud/Tests/Common/Collection/ArrayCollectionTest.php @@ -21,7 +21,6 @@ class ArrayCollectionTest extends OpenCloudTestCase { - public function test_Basic_Operations() { $iterator = $this->getMockForAbstractClass('OpenCloud\Common\Collection\ArrayCollection'); diff --git a/tests/OpenCloud/Tests/Common/Log/LoggerTest.php b/tests/OpenCloud/Tests/Common/Log/LoggerTest.php index 0cdbdcc40..da06da6d0 100644 --- a/tests/OpenCloud/Tests/Common/Log/LoggerTest.php +++ b/tests/OpenCloud/Tests/Common/Log/LoggerTest.php @@ -22,7 +22,6 @@ class LoggerTest extends PHPUnit_Framework_TestCase { - public function __construct() { $this->logger = new Logger; diff --git a/tests/OpenCloud/Tests/Common/MetadataTest.php b/tests/OpenCloud/Tests/Common/MetadataTest.php index 655933c3e..d759ccd8a 100644 --- a/tests/OpenCloud/Tests/Common/MetadataTest.php +++ b/tests/OpenCloud/Tests/Common/MetadataTest.php @@ -31,7 +31,6 @@ class MetadataTest extends \OpenCloud\Tests\OpenCloudTestCase { - private $metadata; public function __construct() diff --git a/tests/OpenCloud/Tests/Common/PersistentObjectTest.php b/tests/OpenCloud/Tests/Common/PersistentObjectTest.php index 0f41b7d3c..4f5c886d4 100644 --- a/tests/OpenCloud/Tests/Common/PersistentObjectTest.php +++ b/tests/OpenCloud/Tests/Common/PersistentObjectTest.php @@ -93,7 +93,6 @@ class NamelessObject extends NovaResource class PersistentObjectTest extends \OpenCloud\Tests\OpenCloudTestCase { - private $service; private $instance; diff --git a/tests/OpenCloud/Tests/Common/ServiceTest.php b/tests/OpenCloud/Tests/Common/ServiceTest.php index 6ff99ccd1..1e4e25230 100644 --- a/tests/OpenCloud/Tests/Common/ServiceTest.php +++ b/tests/OpenCloud/Tests/Common/ServiceTest.php @@ -32,7 +32,6 @@ class ServiceTest extends \OpenCloud\Tests\OpenCloudTestCase { - private $service; public function setupObjects() diff --git a/tests/OpenCloud/Tests/Compute/Resource/ImageTest.php b/tests/OpenCloud/Tests/Compute/Resource/ImageTest.php index aa4123b6c..c388e8c73 100644 --- a/tests/OpenCloud/Tests/Compute/Resource/ImageTest.php +++ b/tests/OpenCloud/Tests/Compute/Resource/ImageTest.php @@ -22,7 +22,6 @@ class ImageTest extends ComputeTestCase { - public function test_good_image() { $image = new Image($this->service); diff --git a/tests/OpenCloud/Tests/Compute/Resource/KeyPairTest.php b/tests/OpenCloud/Tests/Compute/Resource/KeyPairTest.php index 609fa825e..493f5a9b0 100644 --- a/tests/OpenCloud/Tests/Compute/Resource/KeyPairTest.php +++ b/tests/OpenCloud/Tests/Compute/Resource/KeyPairTest.php @@ -30,7 +30,6 @@ class KeyPairTest extends ComputeTestCase { - public function test_Service_Methods() { $this->assertInstanceOf( diff --git a/tests/OpenCloud/Tests/Compute/Resource/NetworkTest.php b/tests/OpenCloud/Tests/Compute/Resource/NetworkTest.php index 719a8073e..06ef7e0dc 100644 --- a/tests/OpenCloud/Tests/Compute/Resource/NetworkTest.php +++ b/tests/OpenCloud/Tests/Compute/Resource/NetworkTest.php @@ -35,7 +35,6 @@ class NetworkTest extends ComputeTestCase { - public function setupObjects() { parent::setupObjects(); diff --git a/tests/OpenCloud/Tests/Compute/Resource/ServerMetadataTest.php b/tests/OpenCloud/Tests/Compute/Resource/ServerMetadataTest.php index 5a1073112..f0d6a6a23 100644 --- a/tests/OpenCloud/Tests/Compute/Resource/ServerMetadataTest.php +++ b/tests/OpenCloud/Tests/Compute/Resource/ServerMetadataTest.php @@ -21,7 +21,6 @@ class ServerMetadataTest extends ComputeTestCase { - private $metadata; public function setupObjects() diff --git a/tests/OpenCloud/Tests/Compute/Resource/VolumeAttachmentTest.php b/tests/OpenCloud/Tests/Compute/Resource/VolumeAttachmentTest.php index 9f71ea71e..396439045 100644 --- a/tests/OpenCloud/Tests/Compute/Resource/VolumeAttachmentTest.php +++ b/tests/OpenCloud/Tests/Compute/Resource/VolumeAttachmentTest.php @@ -31,7 +31,6 @@ class VolumeAttachmentTest extends ComputeTestCase { - private $attachment; public function setupObjects() diff --git a/tests/OpenCloud/Tests/Compute/ServiceTest.php b/tests/OpenCloud/Tests/Compute/ServiceTest.php index 538206b27..90537ff22 100644 --- a/tests/OpenCloud/Tests/Compute/ServiceTest.php +++ b/tests/OpenCloud/Tests/Compute/ServiceTest.php @@ -29,7 +29,6 @@ class ServiceTest extends ComputeTestCase { - public function test__construct() { $this->assertInstanceOf( @@ -95,5 +94,5 @@ public function testV1Dot1IsSupported() $computeService = $this->getClient()->computeService(null, 'DFW'); $this->assertStringStartsWith('/v1.1', $computeService->getUrl()->getPath()); - } + } } diff --git a/tests/OpenCloud/Tests/DNS/Resource/DomainTest.php b/tests/OpenCloud/Tests/DNS/Resource/DomainTest.php index c097abe47..a2cba23fb 100644 --- a/tests/OpenCloud/Tests/DNS/Resource/DomainTest.php +++ b/tests/OpenCloud/Tests/DNS/Resource/DomainTest.php @@ -31,7 +31,6 @@ class DomainTest extends DnsTestCase { - public function test__construct() { $this->assertInstanceOf('OpenCloud\DNS\Resource\Domain', $this->domain); diff --git a/tests/OpenCloud/Tests/DNS/Resource/PtrRecordTest.php b/tests/OpenCloud/Tests/DNS/Resource/PtrRecordTest.php index afe42e352..b53335a7d 100644 --- a/tests/OpenCloud/Tests/DNS/Resource/PtrRecordTest.php +++ b/tests/OpenCloud/Tests/DNS/Resource/PtrRecordTest.php @@ -89,4 +89,4 @@ public function test_Load_Balancer_Can_Have_PtrRecords() $this->record->getDeviceParent() ); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/DNS/Resource/RecordTest.php b/tests/OpenCloud/Tests/DNS/Resource/RecordTest.php index 4eb34666b..be73cdda4 100644 --- a/tests/OpenCloud/Tests/DNS/Resource/RecordTest.php +++ b/tests/OpenCloud/Tests/DNS/Resource/RecordTest.php @@ -21,7 +21,6 @@ class RecordTest extends DnsTestCase { - public function test__construct() { $record = $this->domain->record(array( diff --git a/tests/OpenCloud/Tests/DNS/ServiceTest.php b/tests/OpenCloud/Tests/DNS/ServiceTest.php index a8e217bae..73da7403e 100644 --- a/tests/OpenCloud/Tests/DNS/ServiceTest.php +++ b/tests/OpenCloud/Tests/DNS/ServiceTest.php @@ -22,7 +22,6 @@ class ServiceTest extends DnsTestCase { - public function test__construct() { $this->assertInstanceOf('OpenCloud\DNS\Service', $this->service); diff --git a/tests/OpenCloud/Tests/Database/Resource/ConfigurationTest.php b/tests/OpenCloud/Tests/Database/Resource/ConfigurationTest.php index 38c96f5e7..12c0eb5da 100644 --- a/tests/OpenCloud/Tests/Database/Resource/ConfigurationTest.php +++ b/tests/OpenCloud/Tests/Database/Resource/ConfigurationTest.php @@ -21,7 +21,6 @@ class ConfigurationTest extends DatabaseTestCase { - public function test_Class() { $this->assertInstanceOf('OpenCloud\Database\Resource\Configuration', $this->configuration); @@ -51,6 +50,4 @@ public function testInstanceList() { $this->assertInstanceOf(self::COLLECTION_CLASS, $this->configuration->instanceList()); } - - -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Database/Resource/DatastoreTest.php b/tests/OpenCloud/Tests/Database/Resource/DatastoreTest.php index bf248d120..ade80b778 100644 --- a/tests/OpenCloud/Tests/Database/Resource/DatastoreTest.php +++ b/tests/OpenCloud/Tests/Database/Resource/DatastoreTest.php @@ -21,7 +21,6 @@ class DatastoreTest extends DatabaseTestCase { - public function test_Class() { $this->assertInstanceOf('OpenCloud\Database\Resource\Datastore', $this->datastore); @@ -47,4 +46,4 @@ public function testVersionList() { $this->assertInstanceOf(self::COLLECTION_CLASS, $this->datastore->versionList()); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Database/Resource/DatastoreVersionTest.php b/tests/OpenCloud/Tests/Database/Resource/DatastoreVersionTest.php index 618be4d53..a5cb6ec57 100644 --- a/tests/OpenCloud/Tests/Database/Resource/DatastoreVersionTest.php +++ b/tests/OpenCloud/Tests/Database/Resource/DatastoreVersionTest.php @@ -21,7 +21,6 @@ class DatastoreVersionTest extends DatabaseTestCase { - public function test_Class() { $this->assertInstanceOf('OpenCloud\Database\Resource\DatastoreVersion', $this->datastoreVersion); @@ -42,4 +41,4 @@ public function testDelete() { $this->datastore->delete(); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Database/Resource/InstanceTest.php b/tests/OpenCloud/Tests/Database/Resource/InstanceTest.php index 72f2371da..53b0498fb 100644 --- a/tests/OpenCloud/Tests/Database/Resource/InstanceTest.php +++ b/tests/OpenCloud/Tests/Database/Resource/InstanceTest.php @@ -21,7 +21,6 @@ class InstanceTest extends DatabaseTestCase { - public function test_Class() { $this->assertInstanceOf('OpenCloud\Database\Resource\Instance', $this->instance); diff --git a/tests/OpenCloud/Tests/Database/ServiceTest.php b/tests/OpenCloud/Tests/Database/ServiceTest.php index dcd7a7107..8212fb61a 100644 --- a/tests/OpenCloud/Tests/Database/ServiceTest.php +++ b/tests/OpenCloud/Tests/Database/ServiceTest.php @@ -29,7 +29,6 @@ class ServiceTest extends DatabaseTestCase { - public function test__construct() { $this->assertInstanceOf( diff --git a/tests/OpenCloud/Tests/Identity/Resource/RoleTest.php b/tests/OpenCloud/Tests/Identity/Resource/RoleTest.php index d83105289..bb8bf0198 100644 --- a/tests/OpenCloud/Tests/Identity/Resource/RoleTest.php +++ b/tests/OpenCloud/Tests/Identity/Resource/RoleTest.php @@ -31,4 +31,4 @@ public function test_Methods() $role->setDescription('bar'); $this->assertEquals('bar', $role->getDescription()); } -} +} diff --git a/tests/OpenCloud/Tests/Identity/Resource/TokenTest.php b/tests/OpenCloud/Tests/Identity/Resource/TokenTest.php index ea491f7e2..30fe6ce13 100644 --- a/tests/OpenCloud/Tests/Identity/Resource/TokenTest.php +++ b/tests/OpenCloud/Tests/Identity/Resource/TokenTest.php @@ -35,4 +35,4 @@ public function test_Methods() $tenant->setEnabled(false); $this->assertFalse($tenant->isEnabled()); } -} +} diff --git a/tests/OpenCloud/Tests/Identity/Resource/UserTest.php b/tests/OpenCloud/Tests/Identity/Resource/UserTest.php index 925a625d6..d2c594117 100644 --- a/tests/OpenCloud/Tests/Identity/Resource/UserTest.php +++ b/tests/OpenCloud/Tests/Identity/Resource/UserTest.php @@ -21,7 +21,6 @@ class UserTest extends IdentityTestCase { - public function setupObjects() { parent::setupObjects(); diff --git a/tests/OpenCloud/Tests/Image/Resource/ImageTest.php b/tests/OpenCloud/Tests/Image/Resource/ImageTest.php index 0d8255312..5b9fc03b4 100644 --- a/tests/OpenCloud/Tests/Image/Resource/ImageTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/ImageTest.php @@ -139,4 +139,4 @@ public function test_Delete_Tag() $this->assertInstanceOf('Guzzle\Http\Message\Response', $this->image->deleteTag(12345)); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/DocumentTest.php b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/DocumentTest.php index cf0084f6b..1b27aa5dc 100644 --- a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/DocumentTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/DocumentTest.php @@ -50,4 +50,4 @@ public function test_To_String() $this->assertEquals('[{"op": "replace", "path": "/foo", "value": "bar"}]', $document->toString()); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/EncoderTest.php b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/EncoderTest.php index 2912d34bd..bc4dea8f8 100644 --- a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/EncoderTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/EncoderTest.php @@ -60,4 +60,4 @@ public function test_Transform() $this->assertEquals('A', Encoder::transform('A')); $this->assertEquals('!!!!', Encoder::transform('!!!!')); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/OperationTest.php b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/OperationTest.php index d31007c6e..ae1915d9e 100644 --- a/tests/OpenCloud/Tests/Image/Resource/JsonPatch/OperationTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/JsonPatch/OperationTest.php @@ -65,4 +65,4 @@ public function test_Validate_Fails() $operation->setType('foo'); $operation->validate(); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/MemberTest.php b/tests/OpenCloud/Tests/Image/Resource/MemberTest.php index 0937ed74f..d4b106db7 100644 --- a/tests/OpenCloud/Tests/Image/Resource/MemberTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/MemberTest.php @@ -84,4 +84,4 @@ public function test_Delete() $this->assertInstanceOf('Guzzle\Http\Message\Response', $response); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/Schema/PropertyTest.php b/tests/OpenCloud/Tests/Image/Resource/Schema/PropertyTest.php index c4b11e5b0..7eccbef72 100644 --- a/tests/OpenCloud/Tests/Image/Resource/Schema/PropertyTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/Schema/PropertyTest.php @@ -126,4 +126,4 @@ public function test_Get_Path() $this->assertEquals('/id', $property->getPath()); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/Resource/Schema/SchemaTest.php b/tests/OpenCloud/Tests/Image/Resource/Schema/SchemaTest.php index 66d16b3fe..9d9b70f0a 100644 --- a/tests/OpenCloud/Tests/Image/Resource/Schema/SchemaTest.php +++ b/tests/OpenCloud/Tests/Image/Resource/Schema/SchemaTest.php @@ -73,4 +73,4 @@ public function test_Deciding_Operation_Type() $property2 = Property::factory(array('type' => 'string', 'name' => 'username')); $this->assertEquals(OperationType::ADD, $schema1->decideOperationType($property2)); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Image/ServiceTest.php b/tests/OpenCloud/Tests/Image/ServiceTest.php index 8b3cfa940..e9fac1023 100644 --- a/tests/OpenCloud/Tests/Image/ServiceTest.php +++ b/tests/OpenCloud/Tests/Image/ServiceTest.php @@ -59,4 +59,4 @@ public function test_Member_Schema() { $this->assertInstanceOf('OpenCloud\Image\Resource\Schema\Schema', $this->service->getMemberSchema()); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/LoadBalancer/ServiceTest.php b/tests/OpenCloud/Tests/LoadBalancer/ServiceTest.php index 247525033..6bd047064 100644 --- a/tests/OpenCloud/Tests/LoadBalancer/ServiceTest.php +++ b/tests/OpenCloud/Tests/LoadBalancer/ServiceTest.php @@ -29,7 +29,6 @@ class ServiceTest extends \OpenCloud\Tests\OpenCloudTestCase { - private $service; public function setupObjects() diff --git a/tests/OpenCloud/Tests/MockSubscriber.php b/tests/OpenCloud/Tests/MockSubscriber.php index 7cb85acf0..d55d1e438 100644 --- a/tests/OpenCloud/Tests/MockSubscriber.php +++ b/tests/OpenCloud/Tests/MockSubscriber.php @@ -64,4 +64,4 @@ public function onRequestBeforeSend(Event $event) $event->stopPropagation(); } } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/ObjectStore/ObjectStoreTestCase.php b/tests/OpenCloud/Tests/ObjectStore/ObjectStoreTestCase.php index 9640777cc..985f7830c 100644 --- a/tests/OpenCloud/Tests/ObjectStore/ObjectStoreTestCase.php +++ b/tests/OpenCloud/Tests/ObjectStore/ObjectStoreTestCase.php @@ -56,4 +56,4 @@ public function setupObjects() $this->container = $this->service->getContainer('foo'); } -} +} diff --git a/tests/OpenCloud/Tests/ObjectStore/Resource/DataObjectTest.php b/tests/OpenCloud/Tests/ObjectStore/Resource/DataObjectTest.php index 343a3ae4c..8193c267d 100644 --- a/tests/OpenCloud/Tests/ObjectStore/Resource/DataObjectTest.php +++ b/tests/OpenCloud/Tests/ObjectStore/Resource/DataObjectTest.php @@ -22,7 +22,6 @@ class DataObjectTest extends ObjectStoreTestCase { - public function test_Pseudo_Dirs() { $this->addMockSubscriber($this->makeResponse('[{"subdir": "foo"}]')); diff --git a/tests/OpenCloud/Tests/ObjectStore/Resource/TransferTest.php b/tests/OpenCloud/Tests/ObjectStore/Resource/TransferTest.php index 14349ab75..cf08b8aea 100644 --- a/tests/OpenCloud/Tests/ObjectStore/Resource/TransferTest.php +++ b/tests/OpenCloud/Tests/ObjectStore/Resource/TransferTest.php @@ -23,7 +23,6 @@ class TransferTest extends ObjectStoreTestCase { - public function test_Consecutive_Transfer() { $options = array('objectName' => 'NEW_OBJECT'); diff --git a/tests/OpenCloud/Tests/ObjectStore/ServiceTest.php b/tests/OpenCloud/Tests/ObjectStore/ServiceTest.php index 232391bcc..e5a898712 100644 --- a/tests/OpenCloud/Tests/ObjectStore/ServiceTest.php +++ b/tests/OpenCloud/Tests/ObjectStore/ServiceTest.php @@ -30,7 +30,6 @@ class ServiceTest extends ObjectStoreTestCase { - public function test__construct() { $service = $this->getClient()->objectStoreService('cloudFiles', 'DFW'); diff --git a/tests/OpenCloud/Tests/OpenStackTest.php b/tests/OpenCloud/Tests/OpenStackTest.php index a2e6f9bf3..f38f3777b 100644 --- a/tests/OpenCloud/Tests/OpenStackTest.php +++ b/tests/OpenCloud/Tests/OpenStackTest.php @@ -184,4 +184,4 @@ public function test_Import_Credentials_Numeric_Tenant() $this->assertEquals('{expiration}', $this->client->getExpiration()); $this->assertEquals($randomNumericTenant, $this->client->getTenant()); } -} \ No newline at end of file +} diff --git a/tests/OpenCloud/Tests/Orchestration/OrchestrationTestCase.php b/tests/OpenCloud/Tests/Orchestration/OrchestrationTestCase.php index 66e2fb9bf..6bca04448 100644 --- a/tests/OpenCloud/Tests/Orchestration/OrchestrationTestCase.php +++ b/tests/OpenCloud/Tests/Orchestration/OrchestrationTestCase.php @@ -45,27 +45,33 @@ public function setupObjects() $this->resource = $this->stack->getResource('MySqlCloudDatabaseServer'); } - protected function assertIsService($object) { + protected function assertIsService($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Service', $object); } - protected function assertIsBuildInfo($object) { + protected function assertIsBuildInfo($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Resource\BuildInfo', $object); } - protected function assertIsEvent($object) { + protected function assertIsEvent($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Resource\Event', $object); } - protected function assertIsResource($object) { + protected function assertIsResource($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Resource\Resource', $object); } - protected function assertIsResourceType($object) { + protected function assertIsResourceType($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Resource\ResourceType', $object); } - protected function assertIsStack($object) { + protected function assertIsStack($object) + { $this->assertInstanceOf('OpenCloud\Orchestration\Resource\Stack', $object); } } diff --git a/tests/OpenCloud/Tests/Orchestration/ServiceTest.php b/tests/OpenCloud/Tests/Orchestration/ServiceTest.php index 4d5c1032d..b0f4ef95e 100644 --- a/tests/OpenCloud/Tests/Orchestration/ServiceTest.php +++ b/tests/OpenCloud/Tests/Orchestration/ServiceTest.php @@ -22,7 +22,6 @@ class ServiceTest extends OrchestrationTestCase { - public function test__construct() { $service = $this->getClient()->orchestrationService(null, 'DFW'); diff --git a/tests/OpenCloud/Tests/Queues/Resource/QueueTest.php b/tests/OpenCloud/Tests/Queues/Resource/QueueTest.php index ada7f0b26..5237d48a9 100644 --- a/tests/OpenCloud/Tests/Queues/Resource/QueueTest.php +++ b/tests/OpenCloud/Tests/Queues/Resource/QueueTest.php @@ -31,7 +31,6 @@ class QueueTest extends QueuesTestCase { - public function test_Create() { $this->addMockSubscriber($this->makeResponse(null, 201)); @@ -166,7 +165,6 @@ public function test_Getting_Claim() public function test_List_Messages_Boolean_Casting() { - // Test true (boolean) casts to "true" (string) $messages = $this->queue->listMessages(array('echo' => true)); $options = $messages->getOptions(); @@ -186,6 +184,5 @@ public function test_List_Messages_Boolean_Casting() $messages = $this->queue->listMessages(array('echo' => 'false')); $options = $messages->getOptions(); $this->assertEquals('false', $options['baseUrl']->getQuery()->get('echo')); - - } + } } diff --git a/tests/OpenCloud/Tests/Queues/ServiceTest.php b/tests/OpenCloud/Tests/Queues/ServiceTest.php index b7f5e3e2c..7864e6770 100644 --- a/tests/OpenCloud/Tests/Queues/ServiceTest.php +++ b/tests/OpenCloud/Tests/Queues/ServiceTest.php @@ -19,7 +19,6 @@ class ServiceTest extends QueuesTestCase { - public function test_ClientId() { $rand = sha1(rand(1, 9999)); diff --git a/tests/OpenCloud/Tests/RackspaceTest.php b/tests/OpenCloud/Tests/RackspaceTest.php index b24f082f6..790d54645 100644 --- a/tests/OpenCloud/Tests/RackspaceTest.php +++ b/tests/OpenCloud/Tests/RackspaceTest.php @@ -17,7 +17,6 @@ namespace OpenCloud\Tests; - class RackspaceTest extends OpenCloudTestCase { const CREDENTIALS = <<assertNotNull(Version::getGuzzleVersion()); } -} +} diff --git a/tests/OpenCloud/Tests/Volume/Resource/SnapshotTest.php b/tests/OpenCloud/Tests/Volume/Resource/SnapshotTest.php index 8ea4b45b4..8fc0b39ab 100644 --- a/tests/OpenCloud/Tests/Volume/Resource/SnapshotTest.php +++ b/tests/OpenCloud/Tests/Volume/Resource/SnapshotTest.php @@ -21,7 +21,6 @@ class SnapshotTest extends VolumeTestCase { - private $snapshot; public function setupObjects() @@ -65,8 +64,8 @@ public function testResourceName() */ public function testUpdateDisallowedProperties() { - $this->volume->rename(array( + $this->volume->rename(array( 'volume_id' => 'abcd-ef12' - )); + )); } } diff --git a/tests/OpenCloud/Tests/Volume/Resource/VolumeTest.php b/tests/OpenCloud/Tests/Volume/Resource/VolumeTest.php index db182db20..3b2667c67 100644 --- a/tests/OpenCloud/Tests/Volume/Resource/VolumeTest.php +++ b/tests/OpenCloud/Tests/Volume/Resource/VolumeTest.php @@ -66,8 +66,8 @@ public function testResourceName() */ public function testUpdateDisallowedProperties() { - $this->volume->rename(array( + $this->volume->rename(array( 'size' => 314 - )); + )); } } diff --git a/tests/OpenCloud/Tests/Volume/Resource/VolumeTypeTest.php b/tests/OpenCloud/Tests/Volume/Resource/VolumeTypeTest.php index 0b8eae1f0..a8730c8ad 100644 --- a/tests/OpenCloud/Tests/Volume/Resource/VolumeTypeTest.php +++ b/tests/OpenCloud/Tests/Volume/Resource/VolumeTypeTest.php @@ -21,7 +21,6 @@ class VolumeTypeTest extends VolumeTestCase { - private $volumeType; public function setupObjects() diff --git a/tests/OpenCloud/Tests/Volume/ServiceTest.php b/tests/OpenCloud/Tests/Volume/ServiceTest.php index dd6ebb179..d2569cbb2 100644 --- a/tests/OpenCloud/Tests/Volume/ServiceTest.php +++ b/tests/OpenCloud/Tests/Volume/ServiceTest.php @@ -19,7 +19,6 @@ class ServiceTest extends VolumeTestCase { - public function test__construct() { $this->assertInstanceOf( diff --git a/tests/OpenCloud/Tests/Volume/VolumeTestCase.php b/tests/OpenCloud/Tests/Volume/VolumeTestCase.php index 657f46755..e956631f7 100644 --- a/tests/OpenCloud/Tests/Volume/VolumeTestCase.php +++ b/tests/OpenCloud/Tests/Volume/VolumeTestCase.php @@ -33,4 +33,4 @@ public function setupObjects() $this->addMockSubscriber($this->getTestFilePath('Volume')); $this->volume = $this->service->volume('foo'); } -} +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index eca206a70..08888c4d1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -17,4 +17,4 @@ require __DIR__ . '/../vendor/autoload.php'; -define('ROOT_TEST_DIR', __DIR__ . '/OpenCloud/Tests/'); \ No newline at end of file +define('ROOT_TEST_DIR', __DIR__ . '/OpenCloud/Tests/');