eihmels/integer-value-objects 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eihmels/integer-value-objects

Composer 安装命令:

composer require eihmels/integer-value-objects

包简介

some Value Objects

README 文档

README

inspired by https://martinfowler.com/bliki/ValueObject.html

In this Package there are a bunch of Integer Value Objects with some validations. you can inherit this base Values to adapt it to your wishes.

Install

    composer require eihmels/integer-value-objects

ValueObjects

all Value Objects Inherite from NumberInterface. In this Interface are some basic functions defined. take a look into src/NumberInterface.php.

You are not allowed to change the values after initializing.

Basic Integer

src/Integer.php

example:

    $one = Integer:create(1);

Natural Number

src/NaturalNumber.php

A natural Number is a Positive Integer.

example:

    $one = NaturalNumber:create(1);

0 isn't a valid NaturalNumber. if you define 0 to natural numbers use NaturalNumbersWithNull.

example:

    $null = NaturalNumberWithNull:create(0);

Codequality Tools

run phpUnit

    php ./vendor/bin/phpunit.phar --configuration ./phpunit.xml
    php ./vendor/bin/phpunit.phar --coverage-html ./coverage-report

run phpstan

   php ./vendor/bin/phpcs.phar --standard=./ruleset.xml  ./src/*/
   php ./vendor/bin/phpcs.phar --standard=./ruleset.xml  ./tests/*

run phpstan

   php ./vendor/bin/phpstan.phar analyse -l max  ./src/

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固