|
@@ -61,6 +61,18 @@ class InvalidName {}
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
+ public function configure(array $configuration = null)
|
|
|
+ {
|
|
|
+ parent::configure($configuration);
|
|
|
+
|
|
|
+ if (null !== $this->configuration['dir']) {
|
|
|
+ $this->configuration['dir'] = realpath($this->configuration['dir']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* {@inheritdoc}
|
|
|
*/
|
|
@@ -137,6 +149,10 @@ class InvalidName {}
|
|
|
*/
|
|
|
protected function applyFix(\SplFileInfo $file, Tokens $tokens)
|
|
|
{
|
|
|
+ if (null !== $this->configuration['dir'] && 0 !== strpos($file->getRealPath(), $this->configuration['dir'])) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
$namespace = null;
|
|
|
$namespaceStartIndex = null;
|
|
|
$namespaceEndIndex = null;
|