Completed
Push — master ( c25c8e...44516d )
by Kevin
06:39
created
lib/Cli/CommandLoader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     )
20 20
     {
21 21
         if (!is_dir($configDir)) {
22
-            throw new NotFoundException('Configuration dir not found: ' . $configDir);
22
+            throw new NotFoundException('Configuration dir not found: '.$configDir);
23 23
         }
24 24
         $this->config = $configDir;
25 25
 
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function load()
30 30
     {
31
-        self::addCommandDir('Magium\Cli\Command', __DIR__ . '/Command');
31
+        self::addCommandDir('Magium\Cli\Command', __DIR__.'/Command');
32 32
 
33 33
         foreach (self::$dirs as $namespace => $dir) {
34
-            $files = glob($dir . '/*.php');
34
+            $files = glob($dir.'/*.php');
35 35
 
36 36
             foreach ($files as $file) {
37 37
                 $class = substr(basename($file), 0, -4);
38
-                $className = $namespace . '\\' . $class;
38
+                $className = $namespace.'\\'.$class;
39 39
                 if (class_exists($className)) {
40 40
                     $reflection = new \ReflectionClass($className);
41 41
                     if (!$reflection->isInstantiable()) {
Please login to merge, or discard this patch.
lib/Cli/Command/SetElementValue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 
35 35
     protected function execute(InputInterface $input, OutputInterface $output)
36 36
     {
37
-        if (!file_exists($this->path . '/magium.json')) {
37
+        if (!file_exists($this->path.'/magium.json')) {
38 38
             throw new NotFoundException('Configuration file not found.  Please execute magium:init.');
39 39
         }
40 40
         $reader = new \Zend\Config\Reader\Json();
41
-        $config = new Config($reader->fromFile($this->path . '/magium.json'), true);
41
+        $config = new Config($reader->fromFile($this->path.'/magium.json'), true);
42 42
 
43 43
         $class = $input->getArgument('class');
44 44
         $property = $input->getArgument('property');
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $config->magium = [];
52 52
         }
53 53
         if (!class_exists($class)) {
54
-            throw new NotFoundException('Could not find class: ' . $class . '.  You might need to escape blackslashes (\\\\)');
54
+            throw new NotFoundException('Could not find class: '.$class.'.  You might need to escape blackslashes (\\\\)');
55 55
         }
56 56
         $class = strtolower($class);
57 57
         $s = $config->magium;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $s[$class]->$property = $value;
63 63
 
64 64
         $writer = new Json();
65
-        $writer->toFile($this->path . '/magium.json', $config);
65
+        $writer->toFile($this->path.'/magium.json', $config);
66 66
         $output->writeln(sprintf('Wrote value %s for "%s:%s" to %s/magium.json', $value, $class, $property, $this->path));
67 67
     }
68 68
 
Please login to merge, or discard this patch.
lib/Cli/Command/GetElementValue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $collector = new DefaultPropertyCollector();
38 38
         $class = $input->getArgument('class');
39 39
         if (!class_exists($class)) {
40
-            throw new NotFoundException('Could not find the class: ' . $class);
40
+            throw new NotFoundException('Could not find the class: '.$class);
41 41
         }
42 42
         if (!is_subclass_of($class, 'Magium\AbstractConfigurableElement')) {
43 43
             throw new \InvalidArgumentException('Class must be a sub-class of Magium\AbstractConfigurableElement');
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
         foreach ($print as $property) {
59 59
             $output->writeln('');
60 60
             $output->writeln($property->getName());
61
-            $output->writeln("\tDefault Value: " . $property->getDefaultValue());
61
+            $output->writeln("\tDefault Value: ".$property->getDefaultValue());
62 62
             if ($property->getDescription()) {
63
-                $output->writeln("\t" . $property->getDescription());
63
+                $output->writeln("\t".$property->getDescription());
64 64
             }
65 65
         }
66 66
     }
Please login to merge, or discard this patch.
lib/Cli/Command/AbstractApiEnablement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     protected function configure()
22 22
     {
23
-        $this->setName('api:' . $this->getApiName());
23
+        $this->setName('api:'.$this->getApiName());
24 24
         $this->setDescription($this->getApiDescription());
25 25
     }
26 26
 
Please login to merge, or discard this patch.
lib/Cli/Command/UnsetSetting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 
32 32
     protected function execute(InputInterface $input, OutputInterface $output)
33 33
     {
34
-        if (!file_exists($this->path . '/magium.json')) {
34
+        if (!file_exists($this->path.'/magium.json')) {
35 35
             throw new NotFoundException('Configuration file not found.  Please execute magium:init.');
36 36
         }
37 37
         $reader = new \Zend\Config\Reader\Json();
38
-        $config = new Config($reader->fromFile($this->path . '/magium.json'), true);
38
+        $config = new Config($reader->fromFile($this->path.'/magium.json'), true);
39 39
 
40 40
         $name = $input->getArgument('name');
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         $writer = new Json();
47
-        $writer->toFile($this->path . '/magium.json', $config);
47
+        $writer->toFile($this->path.'/magium.json', $config);
48 48
         $output->writeln(sprintf('Removed value for "%s" in %s/magium.json', $name, $this->path));
49 49
     }
50 50
 
Please login to merge, or discard this patch.
lib/Cli/Command/Init.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@
 block discarded – undo
32 32
     {
33 33
         $path = $this->path;
34 34
         if ($path && $path[0] != '/' && $path[1] != ':') {
35
-            $path = getcwd() . '/' . $path;
35
+            $path = getcwd().'/'.$path;
36 36
         }
37 37
         $calcPath = $path;
38 38
         $path = realpath($path);
39 39
         if ($path === false) {
40
-            throw new NotFoundException('Path not found: ' . $calcPath);
40
+            throw new NotFoundException('Path not found: '.$calcPath);
41 41
         }
42 42
         if (!is_writable($path)) {
43
-            throw new NotAccessibleException('Could not write to path: ' . $calcPath);
43
+            throw new NotAccessibleException('Could not write to path: '.$calcPath);
44 44
         }
45
-        $fullPath = $path . '/magium.json';
45
+        $fullPath = $path.'/magium.json';
46 46
         if (file_exists($fullPath)) {
47
-            throw new ExistsException('The file exists already.  Will not overwrite: ' . $fullPath);
47
+            throw new ExistsException('The file exists already.  Will not overwrite: '.$fullPath);
48 48
         }
49 49
         file_put_contents($fullPath, '{}');
50
-        $output->writeln('Created empty JSON configuration file: ' . realpath($fullPath));
50
+        $output->writeln('Created empty JSON configuration file: '.realpath($fullPath));
51 51
 
52 52
     }
53 53
 
Please login to merge, or discard this patch.
lib/Cli/Command/ListElements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public static function addDirectory($dir, $namespace)
18 18
     {
19 19
         if ($dir != realpath($dir)) {
20
-            throw new InvalidConfigurationException('Path not found.  Please ensure that you pass the realpath() in: ' . $dir);
20
+            throw new InvalidConfigurationException('Path not found.  Please ensure that you pass the realpath() in: '.$dir);
21 21
         }
22 22
         self::$dirs[$dir] = $namespace;
23 23
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             'Set if you want the namespace output escaped (useful for copy and paste)'
76 76
         );
77 77
 
78
-        self::addDirectory(realpath(__DIR__ . '/../..'), 'Magium');
78
+        self::addDirectory(realpath(__DIR__.'/../..'), 'Magium');
79 79
     }
80 80
 
81 81
     protected function execute(InputInterface $input, OutputInterface $output)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         sort($paths);
100 100
         $filter = $input->getArgument('filter');
101
-        if (count($paths) > 0 ) {
101
+        if (count($paths) > 0) {
102 102
             $output->writeln('Classes found: ');
103 103
             $escape = $input->getOption('escape');
104 104
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                     $path = str_replace('\\', '\\\\', $path);
108 108
                 }
109 109
                 if ($filter && stripos($path, $filter) !== false) {
110
-                    $output->writeln("\t" . $path);
110
+                    $output->writeln("\t".$path);
111 111
                 }
112 112
             }
113 113
         } else {
Please login to merge, or discard this patch.
lib/Cli/Command/UnsetElementValue.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function execute(InputInterface $input, OutputInterface $output)
34 34
     {
35
-        if (!file_exists($this->path . '/magium.json')) {
35
+        if (!file_exists($this->path.'/magium.json')) {
36 36
             throw new NotFoundException('Configuration file not found.  Please execute magium:init.');
37 37
         }
38 38
         $reader = new \Zend\Config\Reader\Json();
39
-        $config = new Config($reader->fromFile($this->path . '/magium.json'), true);
39
+        $config = new Config($reader->fromFile($this->path.'/magium.json'), true);
40 40
 
41 41
         $name = strtolower($input->getArgument('class'));
42 42
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
 
63 63
         $writer = new Json();
64
-        $writer->toFile($this->path . '/magium.json', $config);
64
+        $writer->toFile($this->path.'/magium.json', $config);
65 65
 
66 66
     }
67 67
 
Please login to merge, or discard this patch.
lib/Cli/Command/SetSetting.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 
34 34
     protected function execute(InputInterface $input, OutputInterface $output)
35 35
     {
36
-        if (!file_exists($this->path . '/magium.json')) {
36
+        if (!file_exists($this->path.'/magium.json')) {
37 37
             throw new NotFoundException('Configuration file not found.  Please execute magium:init.');
38 38
         }
39 39
         $reader = new \Zend\Config\Reader\Json();
40
-        $config = new Config($reader->fromFile($this->path . '/magium.json'), true);
40
+        $config = new Config($reader->fromFile($this->path.'/magium.json'), true);
41 41
 
42 42
         $name = $input->getArgument('name');
43 43
         $value = $input->getArgument('value');
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $config->config->$name = $value;
53 53
 
54 54
         $writer = new Json();
55
-        $writer->toFile($this->path . '/magium.json', $config);
55
+        $writer->toFile($this->path.'/magium.json', $config);
56 56
         $output->writeln(sprintf('Wrote value for "%s" to %s/magium.json', $name, $this->path));
57 57
     }
58 58
 
Please login to merge, or discard this patch.