Skip to content
Permalink
Browse files

Fix codesniff issues

  • Loading branch information
bizurkur committed Feb 16, 2020
1 parent e499520 commit 4abe8ac5251878dbd0c5b0fb48ad689bc3028b5d
@@ -3,7 +3,7 @@
<description>The coding standard for vfsStream.</description>

<file>src</file>
<file>test/phpunit</file>
<file>tests/phpunit</file>
<arg value="p"/>
<rule ref="Doctrine">
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
@@ -26,6 +26,14 @@
<exclude-pattern>src/vfsStreamWrapper.php</exclude-pattern>
</rule>

<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<!--
Disabled until version 3.
Version 2 needs to support two separate namespaces.
-->
<exclude-pattern>src/*</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing">
<exclude-pattern>tests/phpunit/vfsStreamDirectoryIssue134TestCase.php</exclude-pattern>
</rule>
@@ -13,6 +13,7 @@

use ArrayIterator;
use Iterator;
use function class_alias;

/**
* Directory container.
@@ -11,6 +11,8 @@

namespace bovigo\vfs;

use function class_alias;

/**
* Represents a quota for disk space.
*
@@ -11,6 +11,8 @@

namespace bovigo\vfs\content;

use function class_alias;

/**
* Interface for actual file contents.
*
@@ -13,6 +13,7 @@

use function array_filter;
use function array_keys;
use function class_alias;
use function substr;

/**
@@ -14,6 +14,7 @@
use const SEEK_CUR;
use const SEEK_END;
use const SEEK_SET;
use function class_alias;
use function strlen;
use function substr;

@@ -11,6 +11,7 @@

namespace bovigo\vfs\content;

use function class_alias;
use function str_repeat;
use function strlen;
use function substr;
@@ -17,6 +17,7 @@
use DirectoryIterator;
use InvalidArgumentException;
use function array_map;
use function class_alias;
use function explode;
use function file_get_contents;
use function filetype;
@@ -11,6 +11,7 @@

namespace bovigo\vfs;

use function class_alias;
use function clearstatcache;
use function strlen;
use function strncmp;
@@ -11,6 +11,8 @@

namespace bovigo\vfs;

use function class_alias;

/**
* Block container.
*
@@ -12,6 +12,7 @@
namespace bovigo\vfs;

use IteratorAggregate;
use function class_alias;

/**
* Interface for stream contents that are able to store other stream contents.
@@ -13,6 +13,7 @@

use Iterator;
use function array_unshift;
use function class_alias;
use function current;
use function next;
use function reset;
@@ -11,6 +11,8 @@

namespace bovigo\vfs;

use function class_alias;

/**
* Interface for stream contents.
*/
@@ -13,6 +13,7 @@

use Iterator;
use function array_values;
use function class_alias;
use function count;
use function strlen;
use function substr;
@@ -12,6 +12,7 @@
namespace bovigo\vfs;

use Exception;
use function class_alias;

/**
* Exception for vfsStream errors.
@@ -21,9 +21,11 @@
use const LOCK_SH;
use const SEEK_END;
use const SEEK_SET;
use function class_alias;
use function is_resource;
use function is_string;
use function spl_object_hash;
use function sprintf;
use function stream_get_meta_data;
use function time;

@@ -28,6 +28,7 @@
use function array_merge;
use function array_pop;
use function array_values;
use function class_alias;
use function clearstatcache;
use function count;
use function explode;
@@ -16,6 +16,7 @@
use bovigo\vfs\vfsStreamDirectory;
use bovigo\vfs\vfsStreamFile;
use InvalidArgumentException;
use function class_alias;

/**
* Abstract base class providing an implementation for the visit() method.
@@ -16,6 +16,7 @@
use bovigo\vfs\vfsStreamFile;
use InvalidArgumentException;
use const STDOUT;
use function class_alias;
use function fwrite;
use function get_resource_type;
use function is_resource;
@@ -14,6 +14,7 @@
use bovigo\vfs\vfsStreamBlock;
use bovigo\vfs\vfsStreamDirectory;
use bovigo\vfs\vfsStreamFile;
use function class_alias;

/**
* Visitor which traverses a content structure recursively to create an array structure from it.
@@ -15,6 +15,7 @@
use bovigo\vfs\vfsStreamContent;
use bovigo\vfs\vfsStreamDirectory;
use bovigo\vfs\vfsStreamFile;
use function class_alias;

/**
* Interface for a visitor to work on a vfsStream content structure.
@@ -22,15 +22,16 @@
use function bovigo\assert\assertTrue;
use function bovigo\assert\expect;
use function bovigo\assert\predicate\equals;
use function bovigo\assert\predicate\isNotEqualTo;
use function bovigo\assert\predicate\isExistingDirectory;
use function bovigo\assert\predicate\isExistingFile;
use function bovigo\assert\predicate\isNonExistingDirectory;
use function bovigo\assert\predicate\isNonExistingFile;
use function bovigo\assert\predicate\isNotEqualTo;
use function bovigo\assert\predicate\isSameAs;
use function chgrp;
use function chmod;
use function chown;
use function copy;
use function decoct;
use function dirname;
use function fclose;
@@ -727,7 +728,7 @@ public function urlIsUpdatedAfterMove(): void
/**
* @test
*/
public function fileCopy()
public function fileCopy(): void
{
$baz3URL = vfsStream::url('root/baz3');
assertTrue(copy($this->fileInSubdir->url(), $baz3URL));

0 comments on commit 4abe8ac

Please sign in to comment.
You can’t perform that action at this time.