Completed
Push — 15.x ( 481d54...fbe8db )
by Tim
01:46
created
src/Configuration/Operation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
         // create an empty collection if no plugins has been specified
78 78
         if ($this->plugins === null) {
79
-            $this->plugins= new ArrayCollection();
79
+            $this->plugins = new ArrayCollection();
80 80
         }
81 81
     }
82 82
 
Please login to merge, or discard this patch.
src/Configuration/Subject/FileResolver.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
     /**
180 180
      * Return's the elements the filenames consists of.
181 181
      *
182
-     * @return array The array with the filename elements
182
+     * @return string The array with the filename elements
183 183
      */
184 184
     public function getPatternElements()
185 185
     {
Please login to merge, or discard this patch.
RoboFile.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,6 @@
 block discarded – undo
18 18
  * @link      http://www.techdivision.com
19 19
  */
20 20
 
21
-use Lurker\Event\FilesystemEvent;
22
-
23
-use Symfony\Component\Finder\Finder;
24
-
25 21
 /**
26 22
  * Defines the available build tasks.
27 23
  *
Please login to merge, or discard this patch.
src/Configuration/Plugin.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * Return's the reference to the configuration instance.
166 166
      *
167
-     * @return \TechDivision\Import\ConfigurationInterface The configuration instance
167
+     * @return string The configuration instance
168 168
      */
169 169
     public function getConfiguration()
170 170
     {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     /**
249 249
      * Set's the configuration of the operation the plugin has been configured for.
250 250
      *
251
-     * @param \\TechDivision\Import\Configuration\OperationConfigurationInterface $operationConfiguration The operation configuration
251
+     * @param OperationConfigurationInterface $operationConfiguration The operation configuration
252 252
      *
253 253
      * @return void
254 254
      */
Please login to merge, or discard this patch.
src/ConfigurationFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      * @param string $params      A serialized string with additional params that'll be passed to the configuration
110 110
      * @param string $paramsFile  A filename that contains serialized data with additional params that'll be passed to the configuration
111 111
      *
112
-     * @return void
112
+     * @return \TechDivision\Import\ConfigurationInterface
113 113
      */
114 114
     public function factoryFromDirectories(array $directories = array(), $format = 'json', $params = null, $paramsFile = null)
115 115
     {
Please login to merge, or discard this patch.
src/ConfigurationParserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
         // query whether or not a configuration parser mapping is available
75 75
         if (isset($this->parserMappings[$format])) {
76
-            return $this->container->get( $this->parserMappings[$format]);
76
+            return $this->container->get($this->parserMappings[$format]);
77 77
         }
78 78
 
79 79
         // throw an exception, if NO mapping for the passed format has been available
Please login to merge, or discard this patch.
src/Serializer/Serializer.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -187,6 +187,9 @@
 block discarded – undo
187 187
         ->get();
188 188
     }
189 189
 
190
+    /**
191
+     * @param string $format
192
+     */
190 193
     private function visit(VisitorInterface $visitor, Context $context, $data, $format, array $type = null)
191 194
     {
192 195
         $context->initialize(
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function serialize($data, $format, SerializationContext $context = null)
91 91
     {
92
-        if ( ! $this->serializationVisitors->containsKey($format)) {
92
+        if (!$this->serializationVisitors->containsKey($format)) {
93 93
             throw new UnsupportedFormatException(sprintf('The format "%s" is not supported for serialization.', $format));
94 94
         }
95 95
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function deserialize($data, $type, $format, DeserializationContext $context = null)
114 114
     {
115
-        if ( ! $this->deserializationVisitors->containsKey($format)) {
115
+        if (!$this->deserializationVisitors->containsKey($format)) {
116 116
             throw new UnsupportedFormatException(sprintf('The format "%s" is not supported for deserialization.', $format));
117 117
         }
118 118
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         ->map(function(JsonSerializationVisitor $visitor) use ($context, $data) {
156 156
             $this->visit($visitor, $context, $data, 'json');
157 157
             $result = $this->convertArrayObjects($visitor->getRoot());
158
-            if ( ! is_array($result)) {
158
+            if (!is_array($result)) {
159 159
                 throw new RuntimeException(sprintf(
160 160
                     'The input data of type "%s" did not convert to an array, but got a result of type "%s".',
161 161
                     is_object($data) ? get_class($data) : gettype($data),
Please login to merge, or discard this patch.
src/Serializer/SerializerBuilder.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
     }
98 98
     public function setCacheDir($dir)
99 99
     {
100
-        if ( ! is_dir($dir)) {
100
+        if (!is_dir($dir)) {
101 101
             $this->createDir($dir);
102 102
         }
103
-        if ( ! is_writable($dir)) {
103
+        if (!is_writable($dir)) {
104 104
             throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
105 105
         }
106 106
         $this->cacheDir = $dir;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     public function setMetadataDirs(array $namespacePrefixToDirMap)
201 201
     {
202 202
         foreach ($namespacePrefixToDirMap as $dir) {
203
-            if ( ! is_dir($dir)) {
203
+            if (!is_dir($dir)) {
204 204
                 throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
205 205
             }
206 206
         }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      */
236 236
     public function addMetadataDir($dir, $namespacePrefix = '')
237 237
     {
238
-        if ( ! is_dir($dir)) {
238
+        if (!is_dir($dir)) {
239 239
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
240 240
         }
241 241
         if (isset($this->metadataDirs[$namespacePrefix])) {
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
      */
272 272
     public function replaceMetadataDir($dir, $namespacePrefix = '')
273 273
     {
274
-        if ( ! is_dir($dir)) {
274
+        if (!is_dir($dir)) {
275 275
             throw new InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
276 276
         }
277
-        if ( ! isset($this->metadataDirs[$namespacePrefix])) {
277
+        if (!isset($this->metadataDirs[$namespacePrefix])) {
278 278
             throw new InvalidArgumentException(sprintf('There is no directory configured for namespace prefix "%s". Please use addMetadataDir() for adding new directories.', $namespacePrefix));
279 279
         }
280 280
         $this->metadataDirs[$namespacePrefix] = $dir;
@@ -290,24 +290,24 @@  discard block
 block discarded – undo
290 290
         if (null === $annotationReader) {
291 291
             $annotationReader = new AnnotationReader();
292 292
             if (null !== $this->cacheDir) {
293
-                $this->createDir($this->cacheDir.'/annotations');
294
-                $annotationReader = new FileCacheReader($annotationReader, $this->cacheDir.'/annotations', $this->debug);
293
+                $this->createDir($this->cacheDir . '/annotations');
294
+                $annotationReader = new FileCacheReader($annotationReader, $this->cacheDir . '/annotations', $this->debug);
295 295
             }
296 296
         }
297 297
         $metadataDriver = $this->driverFactory->createDriver($this->metadataDirs, $annotationReader);
298 298
         $metadataFactory = new MetadataFactory($metadataDriver, null, $this->debug);
299 299
         $metadataFactory->setIncludeInterfaces($this->includeInterfaceMetadata);
300 300
         if (null !== $this->cacheDir) {
301
-            $this->createDir($this->cacheDir.'/metadata');
302
-            $metadataFactory->setCache(new FileCache($this->cacheDir.'/metadata'));
301
+            $this->createDir($this->cacheDir . '/metadata');
302
+            $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata'));
303 303
         }
304
-        if ( ! $this->handlersConfigured) {
304
+        if (!$this->handlersConfigured) {
305 305
             $this->addDefaultHandlers();
306 306
         }
307
-        if ( ! $this->listenersConfigured) {
307
+        if (!$this->listenersConfigured) {
308 308
             $this->addDefaultListeners();
309 309
         }
310
-        if ( ! $this->visitorsAdded) {
310
+        if (!$this->visitorsAdded) {
311 311
             $this->addDefaultSerializationVisitors();
312 312
             $this->addDefaultDeserializationVisitors();
313 313
         }
Please login to merge, or discard this patch.
src/Parsers/JsonParser.php 3 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @param array $directories An array with diretories to parse
60 60
      *
61
-     * @return void
61
+     * @return string
62 62
      * @throws \Exception Is thrown if the configuration can not be loaded from the configuration files
63 63
      */
64 64
     public function parse(array $directories)
@@ -113,7 +113,6 @@  discard block
 block discarded – undo
113 113
      * List the filenames of a directory.
114 114
      *
115 115
      * @param string  $directory The directory to list
116
-     * @param boolean $recursive Whether to list recursively
117 116
      *
118 117
      * @return array A list of filenames
119 118
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
 
21 21
 namespace TechDivision\Import\Configuration\Jms\Parsers;
22 22
 
23
-use TechDivision\Import\Adapter\PhpFilesystemAdapterInterface;
24 23
 use TechDivision\Import\Configuration\Jms\Utils\ArrayUtilInterface;
25 24
 use TechDivision\Import\Configuration\Jms\ConfigurationParserInterface;
26 25
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
         $files = glob($pattern = sprintf('%s/%s', $directory, $suffix), 0);
125 125
 
126 126
         // parse the subdirectories also
127
-        $dirs = glob($directory. DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR|GLOB_NOSORT|GLOB_BRACE);
127
+        $dirs = glob($directory . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR | GLOB_NOSORT | GLOB_BRACE);
128 128
 
129 129
         // iterate over the subdirectories for its files
130 130
         foreach ($dirs as $dir) {
Please login to merge, or discard this patch.