Skip to content

Commit

Permalink
62751-PHPCS Need to Fix no space found
Browse files Browse the repository at this point in the history
  • Loading branch information
umeshsinghin committed Dec 29, 2024
1 parent e6a16ac commit 3173dce
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/wp-includes/Requests/src/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@ class Cookie {
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $flags argument is not an array.
* @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $reference_time argument is not an integer or null.
*/
public function __construct($name, $value, $attributes = [], $flags = [], $reference_time = null) {
if (is_string($name) === false) {
throw InvalidArgument::create(1, '$name', 'string', gettype($name));
public function __construct( $name, $value, $attributes = [], $flags = [], $reference_time = null ) {
if ( is_string( $name ) === false ) {
throw InvalidArgument::create( 1, '$name', 'string', gettype( $name ) );
}

if (is_string($value) === false) {
throw InvalidArgument::create(2, '$value', 'string', gettype($value));
if ( is_string( $value ) === false ) {
throw InvalidArgument::create( 2, '$value', 'string', gettype( $value ) );
}

if (InputValidator::has_array_access($attributes) === false || InputValidator::is_iterable($attributes) === false) {
throw InvalidArgument::create(3, '$attributes', 'array|ArrayAccess&Traversable', gettype($attributes));
if ( InputValidator::has_array_access( $attributes ) === false || InputValidator::is_iterable( $attributes ) === false ) {
throw InvalidArgument::create( 3, '$attributes', 'array|ArrayAccess&Traversable', gettype( $attributes ) );
}

if (is_array($flags) === false) {
throw InvalidArgument::create(4, '$flags', 'array', gettype($flags));
if ( is_array( $flags ) === false ) {
throw InvalidArgument::create( 4, '$flags', 'array', gettype( $flags ) );
}

if ($reference_time !== null && is_int($reference_time) === false) {
throw InvalidArgument::create(5, '$reference_time', 'integer|null', gettype($reference_time));
if ( null !== $reference_time && false === is_int( $reference_time ) ) {
throw InvalidArgument::create( 5, '$reference_time', 'integer|null', gettype( $reference_time ) );
}

$this->name = $name;
Expand All @@ -109,10 +109,10 @@ public function __construct($name, $value, $attributes = [], $flags = [], $refer
'persistent' => false,
'host-only' => true,
];
$this->flags = array_merge($default_flags, $flags);
$this->flags = array_merge( $default_flags, $flags );

$this->reference_time = time();
if ($reference_time !== null) {
if ( null !== $reference_time ) {
$this->reference_time = $reference_time;
}

Expand Down

0 comments on commit 3173dce

Please sign in to comment.