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

Fixes video title validator #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

murdinc
Copy link

@murdinc murdinc commented Jan 14, 2019

Fixes #45

Updates VideoItemValidator:: validateTitle() to return the video title instead of true when the video title is the correct length, and false when it is too long or empty.

$loc,
$playerEmbedded,
$playerAutoPlay
);

Choose a reason for hiding this comment

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

Whitespace found at end of line

@peter279k
Copy link

The Travis CI build is failed due to failed assertion.

The error message is as follows:

There was 1 failure:
1) Tests\NilPortugues\Sitemap\Item\Video\VideoItemTest::itShouldThrowExceptionOnNewInstanceNoPlayerLoc
Failed asserting that exception of type "NilPortugues\Sitemap\Item\Video\VideoItemException" is thrown.

I think this test should be fixed/concerned.

@@ -65,11 +65,16 @@ public function validateThumbnailLoc($loc)
/**
* @param $title
*
* @return bool
* @return string|false

Choose a reason for hiding this comment

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

I think the return annotation should be type hint.

That is, it should be string|bool.

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.

VideoItem::validateTitle return a boolean instead of the value
3 participants