Skip to content

Instantly share code, notes, and snippets.

@nexik
Last active May 3, 2020 11:01
Show Gist options
  • Save nexik/472e3eeb5fd85f6fba926f7e4226f67d to your computer and use it in GitHub Desktop.
Save nexik/472e3eeb5fd85f6fba926f7e4226f67d to your computer and use it in GitHub Desktop.

Revisions

  1. Tomasz Ślązok revised this gist May 3, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion hour-value-object.php
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    <?php
    class Hour
    {
  2. Tomasz Ślązok revised this gist May 3, 2020. 2 changed files with 12 additions and 3 deletions.
    12 changes: 12 additions & 0 deletions hour-value-object.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@

    <?php
    class Hour
    {
    /**
    * Returns number of seconds in one hour
    */
    public function toInt(): int
    {
    return 3600;
    }
    }
    3 changes: 0 additions & 3 deletions php-global-const.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    <?php
    define('HOUR', 3600);
    define('MINUTE', 60);
  3. Tomasz Ślązok created this gist May 3, 2020.
    3 changes: 3 additions & 0 deletions php-global-const.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    <?php
    define('HOUR', 3600);
    define('MINUTE', 60);