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

Image component - original width and height #5

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
formatting
  • Loading branch information
lpheller committed Nov 3, 2020
commit 3d6a721fc0f69eb77b83acb43478c290f6d35c7d
10 changes: 8 additions & 2 deletions src/Components/ImageComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ class ImageComponent extends Component
* @param string $class
* @return void
*/
public function __construct(Media $image, $lazy = true, $alt = null, $title = null, $width = null, $height = null)
{
public function __construct(
Media $image,
Bool $lazy = true,
String $alt = null,
String $title = null,
String $width = null,
String $height = null
) {
if ($image == new Media) {
throw new InvalidArgumentException("Missing [image] attribute for ". static::class);
}
Expand Down