Skip to content

Commit

Permalink
Add missing semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Mar 1, 2016
1 parent 030f988 commit 12b85b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions en/chronos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ modifiers::
// This code doesn't work with immutable objects
$time->addDay(1);
doSomething($time);
return $time
return $time;

// This works like you'd expect
$time = $time->addDay(1);
$time = doSomething($time);
return $time
return $time;

By capturing the return value of each modification your code will work as
expected. If you ever have an immutable object, and want to create a mutable
Expand Down
4 changes: 2 additions & 2 deletions fr/chronos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ souvenir de remplacer les variables quand vous utilisez les modificateurs::
// Ce code ne fonctionne pas avec les objets immutables
$time->addDay(1);
doSomething($time);
return $time
return $time;

// Ceci fonctionne comme vous le souhaitez
$time = $time->addDay(1);
$time = doSomething($time);
return $time
return $time;

En capturant la valeur de retour pour chaque modification, votre code
fonctionnera comme souhaité. Si vous avez déjà créé un objet immutable, et que
Expand Down

0 comments on commit 12b85b3

Please sign in to comment.