Skip to content

Instantly share code, notes, and snippets.

@mcsee

mcsee/getters.php

Last active Apr 27, 2021
Embed
What would you like to do?
<?php
final class Window {
public $width;
public $height;
public $children;
public function getWidth() {
return $this->width;
}
public function getArea() {
return $this->width * $this->height;
}
public function getChildren() {
return $this->children;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment