Skip to content

Commit 5954ae8

Browse files
committed
Move to phpowermove organization
- Change namespace to `phpowermove\docblock` - Update dependencies - Fix coding standard - Update README - Fix Github Actions workflows
1 parent 363d370 commit 5954ae8

53 files changed

Lines changed: 130 additions & 129 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/api.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ jobs:
2424
- name: Deploy api documentation site
2525
uses: peaceiris/actions-gh-pages@v3
2626
with:
27-
personal_token: ${{ secrets.DOCBLOCK_TOKEN }}
2827
publish_dir: ./api

.github/workflows/coverage-report.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ jobs:
2020
coverage: pcov
2121
- name: Install dependencies
2222
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
23-
- name: CodeClimate coverage report
24-
uses: paambaati/codeclimate-action@v2.7.5
25-
env:
26-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
27-
with:
28-
coverageCommand: "composer coverage:clover"
29-
- name: Scrutinizer coverage report
23+
- name: Generate coverage report
24+
run: composer coverage:clover
25+
- name: Upload coverage report to Scrutinizer
3026
uses: sudo-bot/action-scrutinizer@latest
3127
with:
3228
cli-args: "--format=php-clover clover.xml"

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
clover.xml
33
composer.lock
44
composer.phar
5-
.php.cs.cache
6-
.phpunit.result.cache
5+
*.cache
76
sami.phar
87
vendor/
98
api/
File renamed without changes.

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
# Docblock
22

3-
[![License](https://img.shields.io/github/license/gossi/docblock.svg?style=flat-square)](https://packagist.org/packages/gossi/docblock)
4-
[![Latest Stable Version](https://img.shields.io/packagist/v/gossi/docblock.svg?style=flat-square)](https://packagist.org/packages/gossi/docblock)
5-
[![Total Downloads](https://img.shields.io/packagist/dt/gossi/docblock.svg?style=flat-square&colorB=007ec6)](https://packagist.org/packages/gossi/docblock)
6-
![Tests](https://github.com/gossi/docblock/workflows/Docblock%20Test%20Suite/badge.svg)
7-
![Coverage report](https://github.com/phootwork/phootwork/workflows/Coverage/badge.svg)
8-
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/gossi/docblock.svg?style=flat-square)](https://scrutinizer-ci.com/g/gossi/docblock)
9-
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/gossi/docblock.svg?style=flat-square)](https://scrutinizer-ci.com/g/gossi/docblock)
3+
[![License](https://img.shields.io/github/license/phpowermove/docblock.svg?style=flat-square)](https://packagist.org/packages/phpowermove/docblock)
4+
[![Latest Stable Version](https://img.shields.io/packagist/v/phpowermove/docblock.svg?style=flat-square)](https://packagist.org/packages/phpowermove/docblock)
5+
[![Total Downloads](https://img.shields.io/packagist/dt/phpowermove/docblock.svg?style=flat-square&colorB=007ec6)](https://packagist.org/packages/phpowermove/docblock)
6+
![Tests](https://github.com/phpowermove/docblock/workflows/Docblock%20Test%20Suite/badge.svg)
7+
![Coverage report](https://github.com/phpowermove/docblock/workflows/Coverage/badge.svg)
8+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phpowermove/docblock/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phpowermove/docblock/?branch=master)
9+
[![Code Coverage](https://scrutinizer-ci.com/g/phpowermove/docblock/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/phpowermove/docblock/?branch=master)
1010

1111
PHP Docblock parser and generator. An API to read and write Docblocks.
1212

13+
> __WARNING__: starting from version 4.0 the library has moved to [phpowermove organization](https://github.com/phpowermove) and the namespace is `phpowermove\docblock`.
14+
1315
## Installation
1416

1517
Install via Composer:
1618

1719
```
18-
composer require gossi/docblock
20+
composer require phpowermove/docblock
1921
```
2022

2123
## Usage
@@ -25,15 +27,15 @@ composer require gossi/docblock
2527
a) Simple:
2628

2729
```php
28-
use gossi\docblock\Docblock;
30+
use phpowermove\docblock\Docblock;
2931

3032
$docblock = new Docblock();
3133
```
3234

3335
b) Create from string:
3436

3537
```php
36-
use gossi\docblock\Docblock;
38+
use phpowermove\docblock\Docblock;
3739

3840
$docblock = new Docblock('/**
3941
* Short Description.
@@ -47,7 +49,7 @@ $docblock = new Docblock('/**
4749
c) Create from reflection:
4850

4951
```php
50-
use gossi\docblock\Docblock;
52+
use phpowermove\docblock\Docblock;
5153

5254
$docblock = new Docblock(new \ReflectionClass('MyClass'));
5355
```
@@ -69,7 +71,7 @@ $tags = $docblock->getTags('author');
6971
Append a tag:
7072

7173
```php
72-
use gossi\docblock\tags\AuthorTag;
74+
use phpowermove\docblock\tags\AuthorTag;
7375

7476
$author = new AuthorTag();
7577
$author->setName('gossi');
@@ -79,7 +81,7 @@ $docblock->appendTag($author);
7981
or with fluent API:
8082

8183
```php
82-
use gossi\docblock\tags\AuthorTag;
84+
use phpowermove\docblock\tags\AuthorTag;
8385

8486
$docblock->appendTag(AuthorTag::create()
8587
->setName('gossi')
@@ -108,7 +110,7 @@ echo $docblock;
108110

109111
## Documentation Api
110112

111-
See https://gossi.github.io/docblock
113+
See https://phpowermove.github.io/docblock
112114

113115
## Contributing
114116

@@ -120,4 +122,4 @@ Feel free to fork and submit a pull request (don't forget the tests) and I am ha
120122

121123
## Changelog
122124

123-
Refer to [Releases](https://github.com/gossi/docblock/releases)
125+
Refer to [Releases](https://github.com/phpowermove/docblock/releases)

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"generator"
1515
],
1616
"support" : {
17-
"issues" : "https://github.com/gossi/docblock/issues"
17+
"issues" : "https://github.com/phpowermove/docblock/issues"
1818
},
1919
"autoload" : {
2020
"psr-4" : {
21-
"gossi\\docblock\\" : "src/"
21+
"phpowermove\\docblock\\" : "src/"
2222
}
2323
},
2424
"autoload-dev" : {
2525
"psr-4" : {
26-
"gossi\\docblock\\tests\\" : "tests/"
26+
"phpowermove\\docblock\\tests\\" : "tests/"
2727
}
2828
},
2929
"require" : {
@@ -33,7 +33,7 @@
3333
},
3434
"require-dev" : {
3535
"phpunit/phpunit" : "^9.0",
36-
"phootwork/php-cs-fixer-config": "^0.3",
36+
"phootwork/php-cs-fixer-config": "^0.4",
3737
"psalm/phar": "^4.3"
3838
},
3939
"scripts": {

src/Docblock.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
* @license MIT License
88
*/
99

10-
namespace gossi\docblock;
10+
namespace phpowermove\docblock;
1111

12-
use gossi\docblock\tags\AbstractTag;
13-
use gossi\docblock\tags\TagFactory;
1412
use InvalidArgumentException;
1513
use LogicException;
1614
use phootwork\collection\ArrayList;
1715
use phootwork\collection\Map;
1816
use phootwork\lang\Comparator;
17+
use phpowermove\docblock\tags\AbstractTag;
18+
use phpowermove\docblock\tags\TagFactory;
1919
use ReflectionClass;
2020
use ReflectionFunctionAbstract;
2121
use ReflectionProperty;
@@ -26,7 +26,7 @@ class Docblock implements \Stringable {
2626
protected ArrayList $tags;
2727
protected ?Comparator $comparator = null;
2828

29-
const REGEX_TAGNAME = '[\w\-\_\\\\]+';
29+
public const REGEX_TAGNAME = '[\w\-\_\\\\]+';
3030

3131
/**
3232
* Static docblock factory
@@ -307,7 +307,8 @@ public function removeTags(string $tagName = ''): void {
307307
* @return bool
308308
*/
309309
public function hasTag(string $tagName): bool {
310-
return $this->tags->search($tagName,
310+
return $this->tags->search(
311+
$tagName,
311312
fn (AbstractTag $tag, string $query): bool => $tag->getTagName() === $query
312313
);
313314
}

src/TagNameComparator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @license MIT License
88
*/
99

10-
namespace gossi\docblock;
10+
namespace phpowermove\docblock;
1111

1212
use phootwork\lang\Comparator;
1313

src/tags/AbstractDescriptionTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @license MIT License
88
*/
99

10-
namespace gossi\docblock\tags;
10+
namespace phpowermove\docblock\tags;
1111

1212
/**
1313
* Abstract tag with a description

src/tags/AbstractTag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @license MIT License
88
*/
99

10-
namespace gossi\docblock\tags;
10+
namespace phpowermove\docblock\tags;
1111

1212
use phootwork\lang\Text;
1313

@@ -32,7 +32,7 @@ public static function create(string $content = ''): self {
3232
*/
3333
final public function __construct(string $content = '') {
3434
$this->tagName = Text::create(get_class($this))
35-
->trimStart('gossi\\docblock\\tags\\')
35+
->trimStart('phpowermove\\docblock\\tags\\')
3636
->trimEnd('Tag')
3737
->toKebabCase()
3838
->toString()

0 commit comments

Comments
 (0)