Skip to content

[Minor] Static Code Analysis with Php Inspections (EA Extended) - #1174

Merged
bshaffer merged 7 commits into
googleapis:masterfrom
kalessil:master
Mar 22, 2017
Merged

bshaffer merged 7 commits into
googleapis:masterfrom
kalessil:master

Conversation

@kalessil

Copy link
Copy Markdown
Contributor

I recently run into the "only Php talk" video and thought that supporting our community member would be a good idea =)

Tweaks found and fixed automatically by Php Inspections (EA Extended) (my pet-project):

  • dead code;
  • control flow simplifications;
  • language level and code style;

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Mar 15, 2017
@kalessil

Copy link
Copy Markdown
Contributor Author

I signed it!

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Mar 15, 2017

@bshaffer bshaffer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with most of these changes, but I prefer the readability of is_null, so unless there's a good reason I'd like to keep it the way it is.

}

if (is_null($cache)) {
if (null === $cache) {

This comment was marked as spam.

This comment was marked as spam.

Comment thread src/Google/Client.php
$scopes = $this->prepareScopes();
// add refresh subscriber to request a new token
if ($this->isAccessTokenExpired() && isset($token['refresh_token'])) {
if (isset($token['refresh_token']) && $this->isAccessTokenExpired()) {

This comment was marked as spam.

This comment was marked as spam.

Comment thread src/Google/Task/Runner.php Outdated

if (!empty($errors) && isset($errors[0]['reason']) &&
isset($this->retryMap[$errors[0]['reason']])) {
if (!empty($errors) && isset($errors[0]['reason'], $this->retryMap[$errors[0]['reason']])) {

This comment was marked as spam.

This comment was marked as spam.

@bshaffer
bshaffer merged commit 43996f0 into googleapis:master Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants