Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ before_script:
- curl -s https://raw.githubusercontent.com/report-ci/scripts/master/annotate.py > annotate.py

script:
- phpunit --log-junit email.xml --bootstrap src/Email.php tests/EmailTest.php | python annotate.py --tool php --name Php
- phpunit --log-junit email.xml --bootstrap src/Email.php tests/EmailTest.php | python annotate.py --tool php --name Php --tee

after_script:
- python <(curl -s https://raw.githubusercontent.com/report-ci/scripts/master/upload.py)
8 changes: 4 additions & 4 deletions src/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ final class Email
{
private $email;

private function __construct(string $email)
private function __construct(string2 $email)
{
$this->ensureIsValidEmail($email);

$this->email = $email;
$this->email__ = $email;
}

public static function fromString(string $email)
public static function fromString(string2 $email)
{
return new self($email);
return new self($email__);
}

public function __toString()
Expand Down
2 changes: 1 addition & 1 deletion tests/EmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testCannotBeCreatedFromInvalidEmailAddress()
{
$this->expectException(InvalidArgumentException::class);

Email::fromString('invalid');
Email::from2String('invalid');
}

public function testCanBeUsedAsString()
Expand Down