Acme Widget Co

Overview

AcmeWidgetCo

Building app

docker-compose up -d --build

Starting app

docker-compose up -d

Running tests

docker-compose run php vendor/bin/phpunit

Documentation

http://localhost:8080/

Assumptions

  1. Basket complexity will change, so it's build with BasketBuilder (now it can take more than three parameters on the constructor).
  2. Similar Baskets can use same builder or might need other Builder functionality. I'm using trait to add functionality through composition. BasketBuilder is easy to be reused.
  3. BasketBuilder configuration is encapsulated into factory.
  4. Products count and data will change so ProductCatalogueDataStructure is holding the data.
  5. ProductCatalogue is build with ProductCatalogueDataStructure and ProductCatalogueStrategy.
  6. The way products are handled will change so ProductCatalogueStrategy allows logic to be changed.
  7. The way offers are build will change so OffersStrategy allows logic to be changed.
  8. Delivery charge will change so DeliveryChargeRulesStrategy allows logic to be changed as well.
  9. All classes are connected through abstract level - interfaces.
  10. Money is stored as integers to avoid missing one cent issue.
  11. Exercise is using composer to add autoloader and PhpUnit.
  12. Example of BasketDecorator added, to present how new business logic should be introduced.
  13. Composite example added to demonstrate working on a group of Baskets.

Using PhpUnit in PhpStorm

  1. PhpUnit By Remote Interpreter
  2. Provide full docker path to autoloader.php /opt/project/vendor/autoload.php
You might also like...
Yii 2 widget for the Froala WYSIWYG HTML Editor.

Yii Framework Froala WYSIWYG HTML Editor Yii 2 widget for Froala Wysiwyg editor. Installation The preferred way to install this extension is through c

Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker
Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker

Yii2 Date/Time Picker Widget Date/Time Picker widget for Yii2 framework Based on Eonasdan's Bootstrap 3 Date/Time Picker Demo Since this is a part of

A widget that displays a Bible verse every day in the Statamic dashboard
A widget that displays a Bible verse every day in the Statamic dashboard

Statamic Widget: Verse of the Day What is it A widget that displays a Bible verse every day in the Statamic dashboard. How to install it Install via c

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Yii2 SwitchInput widget turns checkboxes and radio buttons into toggle switchinputes

Extends Yii Menu widget

Extends Yii Menu widget. This widget offers a scrollspy and affixed enhanced navigation (upto 2-levels) to highlight sections and secondary sections in each page.

DepDrop widget is a Yii 2 wrapper for the dependent-dropdown jQuery plugin by Krajee.

yii2-widget-depdrop The DepDrop widget is a Yii 2 wrapper for the dependent-dropdown jQuery plugin by Krajee. This plugin allows multi level dependent

An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)
An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)

yii2-widget-fileinput The FileInput widget is a customized file input widget based on Krajee's Bootstrap FileInput JQuery Plugin. The widget enhances

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)
An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

yii2-widget-rangeinput The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default H

An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)
An extended bootstrap alert and alert block widget for Yii2 (sub repo split from yii2-widgets)

yii2-widget-alert This extension contains a couple of useful widgets. The Alert widget extends the \yii\bootstrap\Alert widget with more easy styling

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Adds a widget and REST endpoint for the purpose of displaying post revisions inline on the frontend.

Post History This widget allows visitors to easily diff posts against their earlier revisions, displaying diffs of HTML inline. It should be plug and

Made a custom Elementor widget because i wasn't able to find any free version of a slider with thumbnails.
Made a custom Elementor widget because i wasn't able to find any free version of a slider with thumbnails.

Support my work ❤️ Buy me a coffee ☕ How to install Download - place in plugin folder - Activate under WordPress dashboard. How to use Open Elemento

🐟Sakana-Widget for Typecho Plugin
🐟Sakana-Widget for Typecho Plugin

🐟 SakanaTypecho「石蒜模拟器Typecho插件」 让你的博客可以随时随地“摸鱼”...... 本项目基于sakana-widget的封装,以及上游项目sakana 功能 后台可以配置默认角色名 可选CDN包括JSDelivr、CloudFlare亦可使用本地源 组件大小和边距可调 手

Owner
Grzegorz Bielski
I love engineering
Grzegorz Bielski
A widget that displays a Bible verse every day in the Statamic dashboard

Statamic Widget: Verse of the Day What is it A widget that displays a Bible verse every day in the Statamic dashboard. How to install it Install via c

Michael 2 Jan 27, 2022
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Sebastian Tschan 31.1k Dec 30, 2022
Made a custom Elementor widget because i wasn't able to find any free version of a slider with thumbnails.

Support my work ❤️ Buy me a coffee ☕ How to install Download -> place in plugin folder -> Activate under WordPress dashboard. How to use Open Elemento

Christian Hansen 6 Dec 25, 2022
🐟Sakana-Widget for Typecho Plugin

?? SakanaTypecho「石蒜模拟器Typecho插件」 让你的博客可以随时随地“摸鱼”...... 本项目基于sakana-widget的封装,以及上游项目sakana 功能 后台可以配置默认角色名 可选CDN包括JSDelivr、CloudFlare亦可使用本地源 组件大小和边距可调 手

社会易姐QwQ 9 Dec 12, 2022
Let's Encrypt/ACME Command Line client written in PHP

Acme PHP Acme PHP is a simple yet very extensible CLI client for Let's Encrypt that will help you get and renew free HTTPS certificates. Acme PHP is a

Acme PHP 539 Dec 30, 2022
Icônes Form Widget for October and winter CMS. One library, over 100,000 vector icons, and 108+ icon sets powered by Iconify

Icônes Form Widget ?? ?? ?? Access thousands of SVG icons as a backend form widget. One library, over 100,000 vector icons, Modern replacement for ico

Adil Chehabi 12 Aug 29, 2022
Adds a dashboard widget that allows admins to quickly open the edit screen for any WordPress post type- including orders, products, and subscriptions.

Quick Open Dashboard Widget Requires PHP: 7.0 WP requires at least: 5.7 WP tested up to: 5.7 WC requires at least: 5.6.0 WC tested up to: 5.8.0 Stable

Universal Yums 4 Nov 11, 2021
A set of PHP classes to let you manage your Dynamic Widget UI programmatically.

Dynamic Widget for Flutter A set of PHP classes to let you manage your Dynamic Widget UI programmatically. Why? Why not? Developing my application I f

Agostino Fiscale 3 Mar 22, 2022
The Most Popular JavaScript Calendar as a Filament Widget 💛

The Most Popular JavaScript Calendar as a Filament Widget ?? Features Accepts all configurations from FullCalendar Event click and drop events Upcomin

Guilherme Saade 62 Dec 31, 2022