Passed
Push — develop ( 45600c...ff69f6 )
by Paul
03:16
created
src/PhpUnitGen/Container/Container.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function get($id): object
56 56
     {
57
-        if (! is_string($id)) {
57
+        if (!is_string($id)) {
58 58
             throw new ContainerException('Given identifier to container is not a string.');
59 59
         }
60 60
         if (isset($this->instances[$id])) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function has($id): bool
73 73
     {
74
-        if (! is_string($id)) {
74
+        if (!is_string($id)) {
75 75
             return false;
76 76
         }
77 77
         if (isset($this->instances[$id])) {
Please login to merge, or discard this patch.
src/PhpUnitGen/Container/DependencyInjector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
 
34 34
         $container->setInstance(Parser::class, (new ParserFactory())->create(ParserFactory::PREFER_PHP7));
35 35
 
36
-        $container->setResolver(PhpFileParserInterface::class, function (ContainerInterface $container) {
36
+        $container->setResolver(PhpFileParserInterface::class, function(ContainerInterface $container) {
37 37
             return new PhpFileParser($container->get(Parser::class));
38 38
         });
39 39
 
40
-        $container->setResolver(DirectoryParserInterface::class, function (ContainerInterface $container) {
40
+        $container->setResolver(DirectoryParserInterface::class, function(ContainerInterface $container) {
41 41
             return new DirectoryParser(
42 42
                 $container->get(ConfigInterface::class),
43 43
                 $container->get(FilesystemInterface::class),
Please login to merge, or discard this patch.
src/PhpUnitGen/Parser/DirectoryParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function parse(string $sourceDirectory, string $targetDirectory): DirectoryModelInterface
61 61
     {
62
-        if (! $this->fileSystem->has($sourceDirectory) || ! $this->fileSystem->getMimetype($sourceDirectory) === 'directory') {
62
+        if (!$this->fileSystem->has($sourceDirectory) || !$this->fileSystem->getMimetype($sourceDirectory) === 'directory') {
63 63
             throw new ParsingException(sprintf('The source directory "%s" does not exist.', $sourceDirectory));
64 64
         }
65 65
 
Please login to merge, or discard this patch.
src/PhpUnitGen/Model/PropertyInterface/VisibilityInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * @var null UNKNOWN If the visibility is unknown.
18 18
      */
19
-    const UNKNOWN   = null;
19
+    const UNKNOWN = null;
20 20
 
21 21
     /**
22 22
      * @var int PUBLIC A public visibility.
23 23
      */
24
-    const PUBLIC    = 1;
24
+    const PUBLIC = 1;
25 25
 
26 26
     /**
27 27
      * @var int PUBLIC A protected visibility.
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * @var int PUBLIC A private visibility.
33 33
      */
34
-    const PRIVATE   = 3;
34
+    const PRIVATE = 3;
35 35
 
36 36
     /**
37 37
      * @param int|null $visibility The new visibility to set.
Please login to merge, or discard this patch.
src/PhpUnitGen/Console/GenerateTestsCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                     $sourceDirectory,
102 102
                     $exception->getMessage()
103 103
                 ));
104
-                if (! $config->hasIgnore()) {
104
+                if (!$config->hasIgnore()) {
105 105
                     exit;
106 106
                 }
107 107
             }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function getConfiguration(string $path): ConsoleConfigInterface
123 123
     {
124
-        if (! $this->fileSystem->has($path)) {
124
+        if (!$this->fileSystem->has($path)) {
125 125
             throw new InvalidConfigException(sprintf('Config file "%s" does not exists.', $path));
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/PhpUnitGen/Console/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function doRun(InputInterface $input, OutputInterface $output)
37 37
     {
38
-        if (! $output->isQuiet()) {
38
+        if (!$output->isQuiet()) {
39 39
             $output->writeln(sprintf(
40 40
                 "phpunitgen %s by Paul Thébaud.\n\n",
41 41
                 $this->getVersion()
Please login to merge, or discard this patch.
src/PhpUnitGen/Configuration/JsonConsoleConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         $config = json_decode($config, true);
24 24
 
25
-        if (! is_array($config)) {
25
+        if (!is_array($config)) {
26 26
             throw new InvalidConfigException('Unable to parse JSON config');
27 27
         }
28 28
 
Please login to merge, or discard this patch.
src/PhpUnitGen/Configuration/ConsoleConfig.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,32 +23,32 @@
 block discarded – undo
23 23
         parent::validate($config);
24 24
 
25 25
         // Check boolean parameters
26
-        if (! isset($config['overwrite']) || ! is_bool($config['overwrite'])) {
26
+        if (!isset($config['overwrite']) || !is_bool($config['overwrite'])) {
27 27
             throw new InvalidConfigException('"overwrite" parameter must be set as a boolean.');
28 28
         }
29 29
 
30
-        if (! isset($config['auto']) || ! is_bool($config['auto'])) {
30
+        if (!isset($config['auto']) || !is_bool($config['auto'])) {
31 31
             throw new InvalidConfigException('"auto" parameter must be set as a boolean.');
32 32
         }
33
-        if (! isset($config['ignore']) || ! is_bool($config['ignore'])) {
33
+        if (!isset($config['ignore']) || !is_bool($config['ignore'])) {
34 34
             throw new InvalidConfigException('"ignore" parameter must be set as a boolean.');
35 35
         }
36 36
 
37 37
         // Check string parameters
38
-        if (! isset($config['include']) || ! is_string($config['include'])) {
38
+        if (!isset($config['include']) || !is_string($config['include'])) {
39 39
             throw new InvalidConfigException('"include" parameter must be set as a string.');
40 40
         }
41
-        if (! isset($config['exclude']) || ! is_string($config['exclude'])) {
41
+        if (!isset($config['exclude']) || !is_string($config['exclude'])) {
42 42
             throw new InvalidConfigException('"exclude" parameter must be set as a string.');
43 43
         }
44 44
 
45 45
         // Check that dirs exists
46
-        if (! isset($config['dirs']) || ! is_array($config['dirs']) || count($config['dirs']) < 1) {
46
+        if (!isset($config['dirs']) || !is_array($config['dirs']) || count($config['dirs']) < 1) {
47 47
             throw new InvalidConfigException('"dirs" parameter is not an array or does not contains elements.');
48 48
         }
49 49
         // Validate dirs
50 50
         foreach ($config['dirs'] as $srcDir => $testsDir) {
51
-            if (! is_string($srcDir) || ! is_string($testsDir)) {
51
+            if (!is_string($srcDir) || !is_string($testsDir)) {
52 52
                 throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
src/PhpUnitGen/Configuration/BaseConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
     protected function validate($config): void
43 43
     {
44 44
         // Check that $config is an array
45
-        if (! is_array($config)) {
45
+        if (!is_array($config)) {
46 46
             throw new InvalidConfigException('The config must be an array.');
47 47
         }
48 48
 
49 49
         // Check boolean parameters
50
-        if (! isset($config['interface']) || ! is_bool($config['interface'])) {
50
+        if (!isset($config['interface']) || !is_bool($config['interface'])) {
51 51
             throw new InvalidConfigException('"interface" parameter must be set as a boolean.');
52 52
         }
53 53
     }
Please login to merge, or discard this patch.