-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
private | ||
|
||
def repository | ||
client.repository full_name |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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...()'
Welcome to SideCI!