Skip to content

Commit

Permalink
Fix missing semicolon in class concept (exercism#752)
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-mxp authored Jun 15, 2024
1 parent 4f5b55d commit 0f55982
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions concepts/class-basics/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Door

Classes are instantiated with the `new` keyword, this allocates memory for the class instance and calls the classes constructor method.
Instantiated classes may be assigned to a variable.
To invoke the methods of a class instance, we can use the `->` access operator
To invoke the methods of a class instance, we can use the `->` access operator.

```php
<?php
Expand All @@ -42,14 +42,14 @@ These properties may be referenced internally or externally.

class Car
{
public $color
public $color;

function __construct($color)
{
$this->color = $color;
}

function getColor(): string
function getColor()
{
return $this->color;
}
Expand All @@ -59,4 +59,3 @@ $a_car = new Car("red");
$a_car->color; // => "red" by accessing the property
$a_car->getColor(); // => "red" by invoking the instance method
```

2 changes: 1 addition & 1 deletion concepts/class-basics/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ These properties may be referenced internally or externally.

class Car
{
public $color
public $color;

function __construct($color)
{
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/windowing-system/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ These properties may be referenced internally or externally.

class Car
{
public $color
public $color;

function __construct($color)
{
Expand Down

0 comments on commit 0f55982

Please sign in to comment.