@@ -41,9 +41,8 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function getNamespaceString(): ?string |
43 | 43 | { |
44 | - return Validator::notEmpty()->validate($this->namespace)? |
|
45 | - implode('\\', $this->namespace) : |
|
46 | - null; |
|
44 | + return Validator::notEmpty()->validate($this->namespace) ? |
|
45 | + implode('\\', $this->namespace) : null; |
|
47 | 46 | } |
48 | 47 | |
49 | 48 | /** |
@@ -51,8 +50,7 @@ discard block |
||
51 | 50 | */ |
52 | 51 | public function getNamespaceLast(): ?string |
53 | 52 | { |
54 | - return Validator::notEmpty()->validate($this->namespace)? |
|
55 | - $this->namespace[(count($this->namespace) - 1)] : |
|
56 | - null; |
|
53 | + return Validator::notEmpty()->validate($this->namespace) ? |
|
54 | + $this->namespace[(count($this->namespace) - 1)] : null; |
|
57 | 55 | } |
58 | 56 | } |
@@ -21,17 +21,17 @@ |
||
21 | 21 | /** |
22 | 22 | * @var int PUBLIC A public visibility. |
23 | 23 | */ |
24 | - public const PUBLIC = 1; |
|
24 | + public const PUBLIC = 1; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @var int PUBLIC A protected visibility. |
28 | 28 | */ |
29 | - public const PROTECTED = 2; |
|
29 | + public const PROTECTED = 2; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @var int PUBLIC A private visibility. |
33 | 33 | */ |
34 | - public const PRIVATE = 3; |
|
34 | + public const PRIVATE = 3; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @param int|null $visibility The new visibility to set. |
@@ -45,7 +45,7 @@ |
||
45 | 45 | /** |
46 | 46 | * {@inheritdoc} |
47 | 47 | */ |
48 | - public function catch(Exception $exception, string $path): void |
|
48 | + public function catch (Exception $exception, string $path): void |
|
49 | 49 | { |
50 | 50 | if ($this->config->hasIgnore() |
51 | 51 | && Validator::instance(IgnorableException::class)->validate($exception) |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function parse(Node $node, NodeInterface $parent): NodeInterface |
35 | 35 | { |
36 | - if (! method_exists($this, 'invoke')) { |
|
36 | + if (!method_exists($this, 'invoke')) { |
|
37 | 37 | throw new ParseException(sprintf( |
38 | 38 | 'Class "%s" must implements method invoke described in AbstractNodeParser', |
39 | 39 | get_class($this) |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $phpFile->setName($name); |
60 | 60 | |
61 | 61 | if ($phpFile->getTestableFunctionsCount() === 0) { |
62 | - if (! $this->config->hasInterfaceParsing() || $phpFile->getInterfacesFunctionsCount() === 0) { |
|
62 | + if (!$this->config->hasInterfaceParsing() || $phpFile->getInterfacesFunctionsCount() === 0) { |
|
63 | 63 | return null; |
64 | 64 | } |
65 | 65 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function invoke(string $sourcePath, string $targetPath, string $name = 'GeneratedTest'): bool |
77 | 77 | { |
78 | - if (! $this->fileValidator->validate($sourcePath)) { |
|
78 | + if (!$this->fileValidator->validate($sourcePath)) { |
|
79 | 79 | return false; |
80 | 80 | } |
81 | 81 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | $targetPathExists = $this->fileSystem->has($targetPath); |
116 | 116 | |
117 | - if ($targetPathExists && ! $this->config->hasOverwrite()) { |
|
117 | + if ($targetPathExists && !$this->config->hasOverwrite()) { |
|
118 | 118 | throw new FileExistsException(sprintf('The target file "%s" already exists.', $targetPath)); |
119 | 119 | } |
120 | 120 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $this->output->section(sprintf('Directory "%s" parsing begins.', $sourcePath)); |
89 | 89 | |
90 | 90 | // Check if source directory exists |
91 | - if (! $this->fileSystem->has($sourcePath) || ! $this->fileSystem->getMimetype($sourcePath) === 'directory') { |
|
91 | + if (!$this->fileSystem->has($sourcePath) || !$this->fileSystem->getMimetype($sourcePath) === 'directory') { |
|
92 | 92 | throw new FileNotFoundException(sprintf('The source directory "%s" does not exist.', $sourcePath)); |
93 | 93 | } |
94 | 94 |
@@ -52,8 +52,8 @@ |
||
52 | 52 | if ($type === 'dir') { |
53 | 53 | return false; |
54 | 54 | } |
55 | - if (! $this->validateIncludeRegex($path) |
|
56 | - || ! $this->validateExcludeRegex($path) |
|
55 | + if (!$this->validateIncludeRegex($path) |
|
56 | + || !$this->validateExcludeRegex($path) |
|
57 | 57 | ) { |
58 | 58 | return false; |
59 | 59 | } |