<?php
require_once __DIR__ . '/../../vendor/autoload.php';
use Match\Interface\calculateSquare;
class Rectangle implements calculateSquare
{
private float $x;
private float $y;
public function __construct(float $x, float $y)
{
$this->x = $x;
$this->y = $y;
}
public function calculateSquare(): float
{
return $this->x * $this->y;
}
}
<?php
require_once __DIR__ . '/../../vendor/autoload.php';
use Match\Classes\Square;
use Match\Classes\Rectangle;
use Match\Classes\Circle;
$x = new Square(2.3);
var_dump($x);
{
"name": "vendor-name/blog",
"description": "description",
"minimum-stability": "stable",
"license": "proprietary",
"authors": [
{
"name": "User",
"email": "email@example.com"
}
],
"require": {
},
"autoload": {
"psr-4": {
"Match\\Classes\\" : "Match/Classes",
"Match\\Interface\\" : "Match/Interface"
}
}
}