Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .php_cs

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ To do so:

## Running Coding Standards Checks

This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
standards checks, and provides configuration for our selected checks.
`php-cs-fixer` is installed by default via Composer.
`phpcs` is installed by default via Composer.

To run checks only:

```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
$ composer cs-check
```

To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
flag:
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:


```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
$ composer cs-fix
```

If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.

## Recommended Workflow for Contributions
Expand Down
6 changes: 3 additions & 3 deletions benchmark/FilesystemStorageAdapterBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class FilesystemStorageAdapterBench extends CommonStorageAdapterBench
public function __construct()
{
$this->tmpCacheDir = @tempnam(sys_get_temp_dir(), 'zend_cache_test_');
if (!$this->tmpCacheDir) {
if (! $this->tmpCacheDir) {
$err = error_get_last();
$this->fail("Can't create temporary cache directory-file: {$err['message']}");
} elseif (!@unlink($this->tmpCacheDir)) {
} elseif (! @unlink($this->tmpCacheDir)) {
$err = error_get_last();
$this->fail("Can't remove temporary cache directory-file: {$err['message']}");
} elseif (!@mkdir($this->tmpCacheDir, 0777)) {
} elseif (! @mkdir($this->tmpCacheDir, 0777)) {
$err = error_get_last();
$this->fail("Can't create temporary cache directory: {$err['message']}");
}
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"require-dev": {
"zendframework/zend-serializer": "^2.6",
"zendframework/zend-session": "^2.6.2",
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/phpunit": "^4.8",
"phpbench/phpbench": "^0.10.0"
"phpbench/phpbench": "^0.10.0",
"zendframework/zend-coding-standard": "~1.0.0"
},
"suggest": {
"zendframework/zend-serializer": "Zend\\Serializer component",
Expand Down Expand Up @@ -62,10 +62,10 @@
"@cs-check",
"@test"
],
"upload-coverage": "coveralls -v",
"cs-check": "php-cs-fixer --version && php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}
Loading