Skip to content

Commit

Permalink
Structure refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed May 26, 2021
1 parent 63946d2 commit fd637cf
Show file tree
Hide file tree
Showing 36 changed files with 1,675 additions and 836 deletions.
857 changes: 857 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Not archived
/docs export-ignore
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
editorconfig.xml export-ignore
Makefile export-ignore
phpstan.neon export-ignore
readme.md export-ignore
ruleset.xml export-ignore
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
/vendor
/composer.lock
tests/*/output
tests/*/output
tests/tmp
33 changes: 0 additions & 33 deletions .scrutinizer.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

File renamed without changes.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.PHONY: qa lint cs csf phpstan tests coverage

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs

vendor: composer.json composer.lock
composer install

qa: lint phpstan cs

lint: vendor
vendor/bin/linter src tests

cs: vendor
vendor/bin/codesniffer src tests

csf: vendor
vendor/bin/codefixer src tests

phpstan: vendor
vendor/bin/phpstan analyse -c phpstan.neon src

tests: vendor
vendor/bin/tester -s -p php --colors 1 -C tests/cases

coverage: vendor
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src ./tests/cases
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Doctrine Phone

[![Build Status](https://badgen.net/github/checks/ipublikuj/doctrine-phone/master?cache=300&style=flast-square)](https://github.com/ipublikuj/doctrine-phone)
[![Code coverage](https://badgen.net/coveralls/c/github/ipublikuj/doctrine-phone?cache=300&style=flast-square)](https://coveralls.io/github/ipublikuj/doctrine-phone)
![PHP](https://badgen.net/packagist/php/ipub/doctrine-phone?cache=300&style=flast-square)
[![Licence](https://badgen.net/packagist/license/ipub/doctrine-phone?cache=300&style=flast-square)](https://github.com/ipublikuj/doctrine-phone/blob/master/LICENSE.md)
[![Downloads total](https://badgen.net/packagist/dt/ipub/doctrine-phone?cache=300&style=flast-square)](https://packagist.org/packages/ipub/doctrine-phone)
[![Latest stable](https://badgen.net/packagist/v/ipub/doctrine-phone/latest?cache=300&style=flast-square)](https://packagist.org/packages/ipub/doctrine-phone)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat-square)](https://github.com/phpstan/phpstan)

Phone number manipulation for [Nette Framework](http://nette.org/) and [Doctrine2](http://www.doctrine-project.org/)

## Installation

The best way to install **ipub/doctrine-phone** is using [Composer](http://getcomposer.org/):

```sh
composer require ipub/doctrine-phone
```

After that, you have to register extension in config.neon.

```neon
extensions:
doctrinePhone: IPub\DoctrinePhone\DI\DoctrinePhoneExtension
```

## Documentation

Learn how to manipulate with phone numbers in [documentation](https://github.com/ipublikuj/doctrine-phone/blob/master/docs/en/index.md).

***
Homepage [http://www.ipublikuj.eu](http://www.ipublikuj.eu) and repository [http://github.com/ipublikuj/doctrine-phone](http://github.com/ipublikuj/doctrine-phone).
47 changes: 25 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,38 @@
},

"require" : {
"php" : ">=7.2.0",

"doctrine/orm" : "~2.5",

"nette/di" : "~3.0",
"nette/utils" : "~3.0",

"ipub/phone" : "~2.2"
"php" : ">=7.4.0",
"doctrine/orm" : "^2.6",
"ipub/phone" : "^2.3",
"nette/di" : "^3.0",
"nette/utils" : "^3.2"
},

"require-dev" : {
"nette/bootstrap" : "~3.0",
"nette/http" : "~3.0",
"nette/mail" : "~3.0",
"nette/robot-loader" : "~3.0",
"nette/safe-stream" : "~2.3",
"nette/tester" : "~2.3",

"tracy/tracy" : "~2.4",

"pds/skeleton" : "~1.0",

"nettrine/orm" : "~0.3",
"contributte/console" : "~0.7"
"contributte/console": "^0.9",
"mockery/mockery": "^1.4",
"nette/bootstrap": "^3.1",
"nettrine/cache": "^0.3",
"nettrine/orm": "^0.8",
"ninjify/nunjuck": "^0.3",
"ninjify/qa": "^0.12",
"pds/skeleton": "~1.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-nette": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"tracy/tracy": "^2.8"
},

"autoload" : {
"psr-0" : {
"psr-4" : {
"IPub\\DoctrinePhone\\" : "src/"
}
},

"config" : {
"sort-packages" : true
}
}
8 changes: 5 additions & 3 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This extension brings you a phone number extension into your doctrine entities.

## Installation

The best way to install ipub/doctrine-phone is using [Composer](http://getcomposer.org/):
The best way to install **ipub/doctrine-phone** is using [Composer](http://getcomposer.org/):

```sh
$ composer require ipub/doctrine-phone
composer require ipub/doctrine-phone
```

After that you have to register extension in config.neon.
After that, you have to register extension in config.neon.

```neon
extensions:
Expand All @@ -29,6 +29,7 @@ use Doctrine\ORM\Mapping as ORM;
*/
class AddressEntity extends BaseEntity
{

// ...

/**
Expand All @@ -52,6 +53,7 @@ class AddressEntity extends BaseEntity
{
$this->phone = $phone
}

}
```

Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parameters:
level: max
32 changes: 0 additions & 32 deletions readme.md

This file was deleted.

24 changes: 24 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/ninjify/coding-standard/ruleset.xml">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
<!-- we want brace on same line for multi-line definitions, checked by Squiz.Functions.MultiLineFunctionDeclaration -->
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>

<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing.IncorrectLinesCountAfterLastControlStructure"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<exclude name="SlevomatCodingStandard.ControlStructures.AssignmentInCondition.assignmentInCondition"/>

<exclude name="SlevomatCodingStandard.Commenting.ForbiddenAnnotations.AnnotationForbidden"/>
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDifferentAnnotationsTypes"/>

<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessParameterAnnotation"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation"/>
</rule>

<!--Exclude folders -->
<exclude-pattern>/tests/tmp</exclude-pattern>
<exclude-pattern>tests/PHPStan/stubs/*</exclude-pattern>
</ruleset>
Loading

0 comments on commit fd637cf

Please sign in to comment.