Skip to content

Commit

Permalink
Cleanup and rules for PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed Jun 8, 2020
1 parent a112392 commit 1d8094c
Show file tree
Hide file tree
Showing 49 changed files with 146 additions and 517 deletions.
11 changes: 11 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ return PhpCsFixer\Config::create()
'no_trailing_whitespace_in_comment' => true,
'no_whitespace_in_blank_line' => true,
'single_blank_line_at_eof' => true,
'line_ending' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'non_printable_character' => true,
'phpdoc_no_access' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true
// 'unix_line_endings' => true,
])
->setFinder($finder)
Expand Down
2 changes: 0 additions & 2 deletions Ev/Ev.php
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,6 @@ final public static function createStopped(callable $callback, $data = null, $pr
* EvLoop::fork()). The invocation is done before the event loop blocks next and before EvCheck watchers are being
* called, and only in the child after the fork. Note that if someone calls EvLoop::fork() in the wrong process, the
* fork handlers will be invoked, too.
*
*
*/
final class EvFork extends EvWatcher
{
Expand Down
2 changes: 0 additions & 2 deletions Reflection/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,6 @@ public function __construct(Generator $generator)
* @link https://php.net/manual/en/reflectiongenerator.getexecutingfile.php
* @return string Returns the full path and file name of the currently executing generator.
* @since 7.0
*
*/
public function getExecutingFile()
{
Expand All @@ -1776,7 +1775,6 @@ public function getExecutingFile()
* @link https://php.net/manual/en/reflectiongenerator.construct.php
* @return Generator Returns the currently executing Generator object.
* @since 7.0
*
*/
public function getExecutingGenerator()
{
Expand Down
1 change: 0 additions & 1 deletion SPL/SPL.php
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,6 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
* @param array|object $input The input parameter accepts an array or an Object.
* @param int $flags Flags to control the behaviour of the ArrayObject object.
* @param string $iterator_class Specify the class that will be used for iteration of the ArrayObject object. ArrayIterator is the default class used.
*
*/
public function __construct($input = array(), $flags = 0, $iterator_class = "ArrayIterator") { }

Expand Down
1 change: 0 additions & 1 deletion SPL/SPL_c1.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIt
*
* @throws RuntimeException When the filename cannot be opened
* @throws LogicException When the filename is a directory
*
*/
public function __construct ($file_name, $open_mode = 'r', $use_include_path = false, $context = null) {}

Expand Down
1 change: 0 additions & 1 deletion SQLite/SQLite.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ public function numFields () {}
* case-folded according to the value of the
* {@link https://php.net/manual/en/sqlite.configuration.php#ini.sqlite.assoc-case sqlite.assoc_case}configuration
* option.</p>
*
*/
public function fieldName ($field_index) {}

Expand Down
2 changes: 0 additions & 2 deletions amqp/amqp.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ public function confirmSelect() { }
*
* Note, basic.nack server method will only be delivered if an internal error occurs in the Erlang process
* responsible for a queue (see https://www.rabbitmq.com/confirms.html for details).
*
*/
public function setConfirmCallback(callable $ack_callback=null, callable $nack_callback=null) { }

Expand Down Expand Up @@ -529,7 +528,6 @@ public function waitForConfirm($timeout = 0.0) { }
* string $body) : bool;
*
* and should return boolean false when wait loop should be canceled.
*
*/
public function setReturnCallback(callable $return_callback=null) { }

Expand Down
8 changes: 0 additions & 8 deletions cassandra/cassandra.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

namespace {

/**
Expand Down Expand Up @@ -472,7 +471,6 @@ public static function ssl()
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/
*/

namespace Cassandra {

/**
Expand Down Expand Up @@ -6099,7 +6097,6 @@ public function rewind()
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Cluster/
*/

namespace Cassandra\Cluster {

/**
Expand Down Expand Up @@ -6546,7 +6543,6 @@ public function withConnectionHeartbeatInterval($interval)
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/TimestampGenerator/
*/

namespace Cassandra\TimestampGenerator {

/**
Expand Down Expand Up @@ -6578,7 +6574,6 @@ final class Monotonic implements \Cassandra\TimestampGenerator
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/RetryPolicy/
*/

namespace Cassandra\RetryPolicy {

/**
Expand Down Expand Up @@ -6658,7 +6653,6 @@ public function __construct($childPolicy)
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Type/
*/

namespace Cassandra\Type {

/**
Expand Down Expand Up @@ -7116,7 +7110,6 @@ public function create($value)
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/SSLOptions/
*/

namespace Cassandra\SSLOptions {

/**
Expand Down Expand Up @@ -7207,7 +7200,6 @@ public function withPrivateKey($path, $passphrase)
/**
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/Exception/
*/

namespace Cassandra\Exception {

/**
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"scripts": {
"cs": "php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v --diff"
"cs": "php-cs-fixer fix -v --allow-risky=yes --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v --diff --allow-risky=yes"
}
}
9 changes: 0 additions & 9 deletions couchbase/couchbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1445,8 +1445,6 @@ interface Authenticator {}
* This authenticator uses separate credentials for Cluster management interface
* as well as for each bucket.
*
*
*
* @see \Couchbase\Cluster::authenticate()
* @see \Couchbase\Authenticator
*/
Expand Down Expand Up @@ -1944,7 +1942,6 @@ public function adhoc($adhoc) {}
* @param bool $crossBucket if query includes joins for multiple buckets (default is false)
* @return N1qlQuery
*
*
* @see \Couchbase\Authenticator
* @see \Couchbase\ClassicAuthenticator
*/
Expand All @@ -1960,7 +1957,6 @@ public function crossBucket($crossBucket) {}
*
* @param array $params
* @return N1qlQuery
*
*/
public function positionalParams($params) {}

Expand All @@ -1974,7 +1970,6 @@ public function positionalParams($params) {}
*
* @param array $params
* @return N1qlQuery
*
*/
public function namedParams($params) {}

Expand Down Expand Up @@ -2008,7 +2003,6 @@ public function profile($profileType) {}
* @return N1qlQuery
*
* @see \Couchbase\MutationState
*
*/
public function consistentWith($state) {}

Expand Down Expand Up @@ -2198,7 +2192,6 @@ public function exists($path, $options = []) {}
/**
* Perform several lookup operations inside a single existing JSON document, using a specific timeout
* @return DocumentFragment
*
*/
public function execute() {}
}
Expand Down Expand Up @@ -2432,7 +2425,6 @@ public function withExpiry($expiry) {}
/**
* Perform several mutation operations inside a single existing JSON document.
* @return DocumentFragment
*
*/
public function execute() {}
}
Expand Down Expand Up @@ -3605,7 +3597,6 @@ final private function __construct() {}
*
* @param string $statement statement string
* @return AnalyticsQuery
*
*/
public static function fromString($statement) {}
}
Expand Down
7 changes: 0 additions & 7 deletions date/date_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ interface DateTimeInterface {
* @return DateInterval
* The https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
* difference between the two dates or <b>FALSE</b> on failure.
*
*/
public function diff($datetime2, $absolute = false);

Expand All @@ -41,7 +40,6 @@ public function diff($datetime2, $absolute = false);
* </p>
* @return string
* Returns the formatted date string on success or <b>FALSE</b> on failure.
*
*/
public function format($format);

Expand All @@ -51,7 +49,6 @@ public function format($format);
* @return int
* Returns the timezone offset in seconds from UTC on success
* or <b>FALSE</b> on failure.
*
*/
public function getOffset();

Expand Down Expand Up @@ -162,7 +159,6 @@ public static function getLastErrors() { }
* @return static
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/

public function modify($modify) { }

/**
Expand All @@ -184,7 +180,6 @@ public static function __set_state(array $array) { }
* @param int $day <p>Day of the date.</p>
* @return static|false
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*
*/
public function setDate($year, $month, $day) { }

Expand Down Expand Up @@ -269,7 +264,6 @@ public function diff($datetime2, $absolute = false) { }
* </p>
* @return string
* Returns the formatted date string on success or <b>FALSE</b> on failure.
*
*/
public function format($format) { }

Expand All @@ -279,7 +273,6 @@ public function format($format) { }
* @return int
* Returns the timezone offset in seconds from UTC on success
* or <b>FALSE</b> on failure.
*
*/
public function getOffset() { }

Expand Down
2 changes: 0 additions & 2 deletions dom/dom_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -1865,13 +1865,11 @@ public function __construct ($name) {}
class DOMProcessingInstruction extends DOMNode {

/**
*
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.target
*/
public $target;

/**
*
* @link https://php.net/manual/en/class.domprocessinginstruction.php#domprocessinginstruction.props.data
*/
public $data;
Expand Down
1 change: 0 additions & 1 deletion ds/ds.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @copyright © 2019 PHP Documentation Group
* @license CC-BY 3.0, https://www.php.net/manual/en/cc.license.php
*/

namespace Ds {

use Countable;
Expand Down
Loading

0 comments on commit 1d8094c

Please sign in to comment.