@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | protected function doCreate($path, $files, $recursive) |
49 | 49 | { |
50 | - $files = (array)$files; |
|
50 | + $files = (array) $files; |
|
51 | 51 | |
52 | 52 | $builder = $this |
53 | 53 | ->inflator |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $collection = $this->manager->handle(getcwd(), $files); |
67 | 67 | $builder->setWorkingDirectory($collection->getContext()); |
68 | 68 | |
69 | - $collection->forAll(function ($i, Resource $resource) use ($builder) { |
|
69 | + $collection->forAll(function($i, Resource $resource) use ($builder) { |
|
70 | 70 | return $builder->add($resource->getTarget()); |
71 | 71 | }); |
72 | 72 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | protected function doAdd(ResourceInterface $resource, $files, $recursive) |
137 | 137 | { |
138 | - $files = (array)$files; |
|
138 | + $files = (array) $files; |
|
139 | 139 | |
140 | 140 | $builder = $this |
141 | 141 | ->inflator |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | $builder->setWorkingDirectory($collection->getContext()); |
155 | 155 | |
156 | - $collection->forAll(function ($i, Resource $resource) use ($builder) { |
|
156 | + $collection->forAll(function($i, Resource $resource) use ($builder) { |
|
157 | 157 | return $builder->add($resource->getTarget()); |
158 | 158 | }); |
159 | 159 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | */ |
231 | 231 | protected function doRemove(ResourceInterface $resource, $files) |
232 | 232 | { |
233 | - $files = (array)$files; |
|
233 | + $files = (array) $files; |
|
234 | 234 | |
235 | 235 | $builder = $this |
236 | 236 | ->inflator |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | throw new InvalidArgumentException(sprintf("%s is not a directory", $to)); |
331 | 331 | } |
332 | 332 | |
333 | - $members = (array)$members; |
|
333 | + $members = (array) $members; |
|
334 | 334 | |
335 | 335 | $builder = $this |
336 | 336 | ->deflator |
@@ -117,12 +117,12 @@ |
||
117 | 117 | /** |
118 | 118 | * @inheritdoc |
119 | 119 | */ |
120 | - public function extract($toDirectory) |
|
121 | - { |
|
120 | + public function extract($toDirectory) |
|
121 | + { |
|
122 | 122 | $this->adapter->extract($this->resource, $toDirectory); |
123 | 123 | |
124 | 124 | return $this; |
125 | - } |
|
125 | + } |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * @inheritdoc |
@@ -132,7 +132,7 @@ |
||
132 | 132 | */ |
133 | 133 | public function extract($to = null, $overwrite = false) |
134 | 134 | { |
135 | - $this->adapter->extractMembers($this->resource, $this->location, $to, (bool)$overwrite); |
|
135 | + $this->adapter->extractMembers($this->resource, $this->location, $to, (bool) $overwrite); |
|
136 | 136 | |
137 | 137 | return new \SplFileInfo(sprintf('%s%s', rtrim(null === $to ? getcwd() : $to, '/'), $this->location)); |
138 | 138 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | throw new RuntimeException(sprintf('Failed to parse mtime date from %s', $line)); |
79 | 79 | } |
80 | 80 | |
81 | - $members[] = array( |
|
81 | + $members[] = array( |
|
82 | 82 | 'location' => $chunks[7], |
83 | 83 | 'size' => $chunks[5], |
84 | 84 | 'mtime' => $date, |
@@ -44,13 +44,13 @@ |
||
44 | 44 | // drw-rw-r-- 0 toto titi 0 Jan 3 1980 practice/ |
45 | 45 | // -rw-rw-r-- 0 toto titi 10240 Jan 22 13:31 practice/records |
46 | 46 | if (!preg_match_all("#" . |
47 | - self::PERMISSIONS . "\s+" . // match (drw-r--r--) |
|
48 | - self::HARD_LINK . "\s+" . // match (1) |
|
49 | - self::OWNER . "\s" . // match (toto) |
|
50 | - self::GROUP . "\s+" . // match (titi) |
|
51 | - self::FILESIZE . "\s+" . // match (0) |
|
52 | - self::DATE . "\s+" . // match (Jan 3 1980) |
|
53 | - self::FILENAME . // match (practice) |
|
47 | + self::PERMISSIONS . "\s+" . // match (drw-r--r--) |
|
48 | + self::HARD_LINK . "\s+" . // match (1) |
|
49 | + self::OWNER . "\s" . // match (toto) |
|
50 | + self::GROUP . "\s+" . // match (titi) |
|
51 | + self::FILESIZE . "\s+" . // match (0) |
|
52 | + self::DATE . "\s+" . // match (Jan 3 1980) |
|
53 | + self::FILENAME . // match (practice) |
|
54 | 54 | "#", $line, $matches, PREG_SET_ORDER |
55 | 55 | )) { |
56 | 56 | continue; |
@@ -36,13 +36,13 @@ |
||
36 | 36 | $matches = array(); |
37 | 37 | |
38 | 38 | // -rw-r--r-- gray/staff 62373 2006-06-09 12:06 apple |
39 | - if (!preg_match_all("#". |
|
40 | - self::PERMISSIONS . "\s+" . // match (-rw-r--r--) |
|
41 | - self::OWNER . "/" . // match (gray) |
|
42 | - self::GROUP . "\s+" . // match (staff) |
|
43 | - self::FILESIZE . "\s+" . // match (62373) |
|
44 | - self::ISO_DATE . "\s+" . // match (2006-06-09 12:06) |
|
45 | - self::FILENAME . // match (apple) |
|
39 | + if (!preg_match_all("#" . |
|
40 | + self::PERMISSIONS . "\s+" . // match (-rw-r--r--) |
|
41 | + self::OWNER . "/" . // match (gray) |
|
42 | + self::GROUP . "\s+" . // match (staff) |
|
43 | + self::FILESIZE . "\s+" . // match (62373) |
|
44 | + self::ISO_DATE . "\s+" . // match (2006-06-09 12:06) |
|
45 | + self::FILENAME . // match (apple) |
|
46 | 46 | "#", |
47 | 47 | $line, $matches, PREG_SET_ORDER |
48 | 48 | )) { |
@@ -71,9 +71,9 @@ |
||
71 | 71 | return $members; |
72 | 72 | } |
73 | 73 | |
74 | - /** |
|
75 | - * @inheritdoc |
|
76 | - */ |
|
74 | + /** |
|
75 | + * @inheritdoc |
|
76 | + */ |
|
77 | 77 | public function parseInflatorVersion($output) |
78 | 78 | { |
79 | 79 | $lines = array_values(array_filter(explode("\n", $output, 3))); |
@@ -44,10 +44,10 @@ |
||
44 | 44 | $matches = array(); |
45 | 45 | |
46 | 46 | // 785 2012-10-24 10:39 file |
47 | - if (!preg_match_all("#". |
|
48 | - self::LENGTH . "\s+" . // match (785) |
|
49 | - self::ISO_DATE . "\s+" . // match (2012-10-24 10:39) |
|
50 | - self::FILENAME . // match (file) |
|
47 | + if (!preg_match_all("#" . |
|
48 | + self::LENGTH . "\s+" . // match (785) |
|
49 | + self::ISO_DATE . "\s+" . // match (2012-10-24 10:39) |
|
50 | + self::FILENAME . // match (file) |
|
51 | 51 | "#", |
52 | 52 | $line, $matches, PREG_SET_ORDER |
53 | 53 | )) { |
@@ -16,13 +16,13 @@ |
||
16 | 16 | |
17 | 17 | interface ProcessBuilderFactoryInterface |
18 | 18 | { |
19 | - /** |
|
20 | - * Returns a new instance of Symfony ProcessBuilder |
|
21 | - * |
|
22 | - * @return ProcessBuilder |
|
23 | - * |
|
24 | - * @throws InvalidArgumentException |
|
25 | - */ |
|
19 | + /** |
|
20 | + * Returns a new instance of Symfony ProcessBuilder |
|
21 | + * |
|
22 | + * @return ProcessBuilder |
|
23 | + * |
|
24 | + * @throws InvalidArgumentException |
|
25 | + */ |
|
26 | 26 | public function create(); |
27 | 27 | |
28 | 28 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function __construct($context, array $elements, $temporary) |
29 | 29 | { |
30 | - array_walk($elements, function ($element) { |
|
30 | + array_walk($elements, function($element) { |
|
31 | 31 | if (!$element instanceof Resource) { |
32 | 32 | throw new InvalidArgumentException('ResourceCollection only accept Resource elements'); |
33 | 33 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $target = $this->getTarget($context, $resource); |
33 | 33 | |
34 | - if (! file_exists(dirname($target)) && false === mkdir(dirname($target))) { |
|
34 | + if (!file_exists(dirname($target)) && false === mkdir(dirname($target))) { |
|
35 | 35 | throw new IOException(sprintf('Could not create parent directory %s', dirname($target))); |
36 | 36 | } |
37 | 37 |