Skip to content

Commit

Permalink
styleci fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkit committed Feb 18, 2015
1 parent d4cf2c3 commit b61c2c0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ tools:
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
excluded_dirs: [vendor, tests]
28 changes: 16 additions & 12 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(array $config)
}

/**
* Getter for the google client
* Getter for the google client.
*
* @return \Google_Client
*/
Expand All @@ -55,11 +55,13 @@ public function getClient()
}

/**
* Getter for the google service
* Getter for the google service.
*
* @param string $service
*
* @param string $service
* @return \Google_Service
* @throws \Exception
*
* @return \Google_Service
*/
public function make($service)
{
Expand All @@ -75,7 +77,7 @@ public function make($service)
}

/**
* Setup correct auth method based on type
* Setup correct auth method based on type.
*
* @return void
*/
Expand All @@ -97,7 +99,7 @@ protected function auth()
}

/**
* Determine and use credentials if user has set them
* Determine and use credentials if user has set them.
*
* @return boolean used or not
*/
Expand All @@ -120,7 +122,7 @@ protected function useAssertCredentials()

/**
* Determine and use app engine credentials
* if running on app engine
* if running on app engine.
*
* @return boolean used or not
*/
Expand All @@ -138,17 +140,19 @@ protected function useAppEngine()
}

/**
* Magic call method
* Magic call method.
*
* @param string $method
* @param array $parameters
*
* @param string $method
* @param array $parameters
* @return mixed
* @throws \BadMethodCallException
*
* @return mixed
*/
public function __call($method, $parameters)
{
if (method_exists($this->client, $method)) {
return call_user_func_array(array($this->client, $method), $parameters);
return call_user_func_array([$this->client, $method], $parameters);
}

throw new \BadMethodCallException(sprintf('Method [%s] does not exist.', $method));
Expand Down
12 changes: 6 additions & 6 deletions src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
| https://developers.google.com/console
|
*/
'client_id' => '',
'client_secret' => '',
'redirect_uri' => '',
'scopes' => [],
'access_type' => 'online',
'client_id' => '',
'client_secret' => '',
'redirect_uri' => '',
'scopes' => [],
'access_type' => 'online',
'approval_prompt' => 'auto',

/*
Expand Down Expand Up @@ -60,5 +60,5 @@
| Example storage_path().'/key/google.p12'
*/
'key' => '',
]
],
];
8 changes: 4 additions & 4 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace PulkitJalan\Google\Tests;
namespace PulkitJalan\Google\tests;

use PHPUnit_Framework_TestCase;
use Mockery;
use PHPUnit_Framework_TestCase;

class ClientTest extends PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -47,8 +47,8 @@ public function testAssertCredentials()
$client = new \PulkitJalan\Google\Client([
'service' => [
'account' => 'name',
'scopes' => ['scope'],
'key' => __DIR__.'/data/cert.p12',
'scopes' => ['scope'],
'key' => __DIR__.'/data/cert.p12',
],
]);

Expand Down

0 comments on commit b61c2c0

Please sign in to comment.