Skip to content

Conversation

JayPHP
Copy link
Member

@JayPHP JayPHP commented Jun 5, 2017

No description provided.

@JayPHP JayPHP requested a review from DaveRandom June 5, 2017 16:34
Copy link
Member

@DaveRandom DaveRandom left a comment

Choose a reason for hiding this comment

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

:cockandballs:

@@ -23,19 +23,12 @@ class MainSiteUser
public static function createFromDOMDocument(\DOMDocument $doc): MainSiteUser // very todo: remove horrible static ctor
{
$xpath = new \DOMXPath($doc);
$twitterHandle = ($link = ltrim(self::getUserLink($xpath, 'iconTwitter'), '@')) === '' ? null : $link;
Copy link
Member

Choose a reason for hiding this comment

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

Won't this throw when getUserLink() returns null?

Copy link
Member Author

@JayPHP JayPHP Jun 6, 2017

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@@ -56,4 +49,13 @@ public function getGithubUsername()
{
return $this->githubUsername;
}

private static function getUserLink($xpath, string $class)
Copy link
Member

Choose a reason for hiding this comment

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

: ?string

Copy link
Member Author

Choose a reason for hiding this comment

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

@DaveRandom #visualDebt

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.

2 participants