Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SideCI Demo Pull Request #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hooliganznat
Copy link
Owner

Welcome to SideCI!

private

def repository
client.repository full_name
Copy link
Owner Author

Choose a reason for hiding this comment

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

[RuboCop]

Layout/ExtraSpacing: Unnecessary spacing detected.

end

def releases
repository&.releases.map(&:name)
Copy link
Owner Author

Choose a reason for hiding this comment

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

[RuboCop]

Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.

private

def repository
client.repository full_name
Copy link
Owner Author

Choose a reason for hiding this comment

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

[RuboCop]

Layout/SpaceBeforeFirstArg: Put one space between the method name and the first argument.

end

def active_branch
repository.branches.max { |a, b| a.updated_at <=> b.updated_at }
Copy link
Owner Author

Choose a reason for hiding this comment

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

[RuboCop]

Performance/CompareWithBlock: Use max_by(&:updated_at) instead of max { |a, b| a.updated_at <=> b.updated_at }.

private $public;
private $branches;

const PublicVisibility = 'public';
Copy link
Owner Author

Choose a reason for hiding this comment

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

[PHPMD]

Constant PublicVisibility should be defined in uppercase

* @param string $name
* @param string $visibility
*/
public function Repository(string $owner, string $name, string $visibility)
Copy link
Owner Author

Choose a reason for hiding this comment

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

[PHPMD]

Repository accesses the super-global variable $_SERVER.

* @param string $name
* @param string $visibility
*/
public function Repository(string $owner, string $name, string $visibility)
Copy link
Owner Author

Choose a reason for hiding this comment

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

[PHPMD]

Classes should not have a constructor method with the same name as the class

private $owner;
private $name;
private $public;
private $branches;
Copy link
Owner Author

Choose a reason for hiding this comment

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

[PHPMD]

Avoid unused private fields such as '$branches'.

/**
* @return bool
*/
public function getPublic(): bool
Copy link
Owner Author

Choose a reason for hiding this comment

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

[PHPMD]

The 'getPublic()' method which returns a boolean should be named 'is...()' or 'has...()'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant