/**
  * @inheritDoc
  * @return CircleFigure
  */
 public function createFromArray(array $params)
 {
     $shapeAttributesFactory = new ShapeAttributesFactory();
     $shapeAttributes = $shapeAttributesFactory->createShapeAttributesFromArray($params['shape']);
     $circleAttributes = new CircleAttributes((int) $params['radius']);
     return new CircleFigure($shapeAttributes, $circleAttributes);
 }
 /**
  * @inheritDoc
  * @return RectangleFigure
  */
 public function createFromArray(array $params)
 {
     $shapeAttributesFactory = new ShapeAttributesFactory();
     $shapeAttributes = $shapeAttributesFactory->createShapeAttributesFromArray($params['shape']);
     $rectangleAttributes = new RectangleAttributes((int) $params['size']);
     return new RectangleFigure($shapeAttributes, $rectangleAttributes);
 }