inklabs / kommerce-core

PHP shopping cart core platform
https://kommerce-laravel-demo.jamieisaacs.com/
Apache License 2.0
64 stars 14 forks source link
clean-code ddd ecommerce oop php shopping-cart solid tdd

Zen Kommerce Core

Test Coverage Build Status Downloads Apache License 2.0

Introduction

Zen Kommerce is a PHP shopping cart system written with SOLID design principles. It is PSR compatible, dependency free, and contains 100% code coverage using TDD practices.

All code (including tests) conform to the PSR-2 coding standards. The namespace and autoloader are using the PSR-4 standard.

Description

This project is over 62,000 lines of code. Unit tests account for 30-40% of that total and execute in under 10 seconds. The repository tests use an in-memory SQLite database.

Design Patterns

Architecture

Flow of Control

Installation

Add the following lines to your composer.json file.

{
    "require": {
        "inklabs/kommerce-core": "dev-master"
    }
}
   composer install

Unit Tests:

    vendor/bin/phpunit

With Code Coverage:

    vendor/bin/phpunit --coverage-text --coverage-html coverage_report

Run Coding Standards Test:

    vendor/bin/phpcs -p --standard=PSR2 src/ tests/

Count Lines of Code:

    vendor/bin/phploc src/ tests/ --names="*.php,*.xml"

Export SQL

    vendor/bin/doctrine orm:schema-tool:create --dump-sql
    vendor/bin/doctrine orm:schema-tool:update --dump-sql

License

Copyright 2014 Jamie Isaacs pdt256@gmail.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.