Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCassia Mancuso
7,843 Pointsno longer passing
Object Oriented PHP Basics code challenge is telling me in the second Task that the first one is no longer passing.... I don't understand what's going on
here is my code. please tell me what's wrong with it.
class Trout extends Fish {
function __construct($name, $flavor. $record){
parent::__construct($name, $flavor, $record);
}
}
1 Answer
Jeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsYou forgot the public keyword before function.
class Trout extends Fish {
public function __construct($name, $flavor, $record){
parent::__construct($name, $flavor, $record);
}
}
And in the __construct function that's in the Trout class, there's a . after the variable $flavor. There should be a comma. I'm sure that's a mistake :)
Cassia Mancuso
7,843 Pointsclass Trout extends Fish{
public function __construct($name, $flavor. $record){
parent:: __construct($name, $flavor, $record);
}
}
i changed it and it's still telling me "OOPS! It looks like Task 1 is no longer passing."
Cassia Mancuso
7,843 PointsI SEE THE PERIOD.... YAY thank you for finding that!!
Jeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsJeremy Canela
Full Stack JavaScript Techdegree Graduate 30,766 PointsI just edited my answer. Hope it works :)!