Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arusinowski committed Apr 24, 2024
1 parent 84e3ca9 commit 10c8540
Show file tree
Hide file tree
Showing 28 changed files with 99 additions and 83 deletions.
39 changes: 35 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
/composer.lock
/plugins
/composer.phar
/phpunit.xml
/.phpunit.result.cache
/phpunit.phar
/config/Migrations/schema-dump-default.lock
/vendor/
/.idea/
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*~
/.ddev/
.idea/*
nbproject/*
.vscode
.DS_Store
.cache
.project
.settings
.svn
errors.err
tags
node_modules
package-lock.json
/nbproject/
/vendor
/webroot/css/style.css.map
/webroot/mix.js.map
/webroot/mix-manifest.json
/tools/
/.phpunit.cache/
/auth.json
/.ddev
/.idea
/.phpunit.result.cache
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.10.32" installed="1.10.32" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.15.0" installed="5.15.0" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="1.10.67" installed="1.10.67" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.23.1" installed="5.23.1" location="./tools/psalm" copy="false"/>
</phive>
6 changes: 0 additions & 6 deletions .semver

This file was deleted.

2 changes: 1 addition & 1 deletion Docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Home
Requirements
------------

* CakePHP 5.0+
* CakePHP 5.0.6+
* PHP 8.1+

Documentation
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ Enumeration list for [CakePHP 5](http://cakephp.org).
Versions and branches
---------------------

| CakePHP | CakeDC Enum Plugin | Tag | Notes |
|:----------|:-------------------------------------------------------|:------|:---------|
| ^5.0.0 | [3.next](https://github.com/cakedc/enum/tree/3next) | 3.0.0 | unstable |
| ^4.0 | [2.next](https://github.com/cakedc/enum/tree/2.next) | 2.0.4 | stable |
| ^3.7 | [master](https://github.com/cakedc/enum/tree/master) | 1.5.0 | stable |
| ^3.7 | [develop](https://github.com/cakedc/enum/tree/develop) | - | unstable |
| ^3.6 | [master](https://github.com/cakedc/enum/tree/1.4.0) | 1.4.0 | stable |
| 3.1 - 3.5 | | 1.3.0 | stable |

| CakePHP | CakeDC Enum Plugin | Tag | Notes |
|:--------|:-----------------------------------------------------------|:------|:-------|
| ^5.0.6 | [3.next](https://github.com/cakedc/enum/tree/3.next-cake5) | 3.1.0 | stable |
| ^4.0 | [2.next](https://github.com/cakedc/enum/tree/2.next) | 2.0.4 | stable |

Install
-------
Expand All @@ -45,7 +40,7 @@ $this->addPlugin('CakeDC/Enum');
Requirements
------------

* CakePHP 5.0+
* CakePHP 5.0.6+
* PHP 8.1+

Documentation
Expand All @@ -68,6 +63,6 @@ This repository follows the [CakeDC Plugin Standard](http://cakedc.com/plugin-st
License
-------

Copyright 2015 - 2023 Cake Development Corporation (CakeDC). All rights reserved.
Copyright 2015 - 2024 Cake Development Corporation (CakeDC). All rights reserved.

Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

31 changes: 14 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,23 @@
}
},
"scripts": {
"analyse": [
"@stan",
"@psalm"
],
"check": [
"@cs-check",
"@test",
"@analyse"
"@test"
],
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
"phpstan": "tools/phpstan analyse",
"psalm": "tools/psalm --show-info=false",
"stan": [
"@phpstan",
"@psalm"
],
"cs-check": "phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
"cs-fix": "phpcbf --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
"test": "phpunit --stderr",
"stan": "phpstan analyse src/",
"psalm": "php vendor/psalm/phar/psalm.phar --show-info=false src/ ",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.94 psalm/phar:~4.9.2 && mv composer.backup composer.json",
"stan-rebuild-baseline": "phpstan analyse --configuration phpstan.neon --error-format baselineNeon src/ > phpstan-baseline.neon",
"psalm-rebuild-baseline": "php vendor/psalm/phar/psalm.phar --show-info=false --set-baseline=psalm-baseline.xml src/",
"rector": "rector process",
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:^0.11.2 && mv composer.backup composer.json",
"coverage-test": "phpunit --stderr --coverage-clover=clover.xml"
"stan-tests": "phpstan.phar analyze -c tests/phpstan.neon",
"stan-baseline": "phpstan.phar --generate-baseline",
"stan-setup": "phive install",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
},
"config": {
"allow-plugins": {
Expand Down
4 changes: 2 additions & 2 deletions config/Migrations/001_create_enum_lookups.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="Throttle">
<ruleset name="cakedc/enum">
<config name="installed_paths" value="../../cakephp/cakephp-codesniffer" />

<rule ref="CakePHP" />
Expand Down
4 changes: 2 additions & 2 deletions src/EnumPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/EnumBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Exception/InvalidAliasListException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Exception/MissingEnumStrategyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Strategy/AbstractStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Strategy/ConfigStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Strategy/ConstStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Strategy/LookupStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Behavior/Strategy/StrategyInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Model/Table/LookupsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions tests/Fixture/ArticlesFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions tests/Fixture/LookupsFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Model/Behavior/EnumBehaviorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
declare(strict_types=1);

/**
* Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2015 - 2023, Cake Development Corporation (http://cakedc.com)
* @copyright Copyright 2015 - 2024, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

Expand Down
Loading

0 comments on commit 10c8540

Please sign in to comment.