Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ec0975

Browse files
committed
Fix CS
1 parent 7d72d85 commit 4ec0975

33 files changed

Lines changed: 46 additions & 85 deletions

lib/PHPExiftool/ClassUtils/Builder.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Builder
3434
protected $uses;
3535
protected $classAnnotations;
3636

37-
public function __construct($namespace, $classname, array $properties, $extends = null, Array $uses = array(), Array $classAnnotations = array())
37+
public function __construct($namespace, $classname, array $properties, $extends = null, array $uses = array(), array $classAnnotations = array())
3838
{
3939
$namespace = trim($namespace, '\\');
4040

@@ -43,11 +43,11 @@ public function __construct($namespace, $classname, array $properties, $extends
4343
continue;
4444
}
4545

46-
if ( ! $this->checkPHPVarName($piece)) {
46+
if (! $this->checkPHPVarName($piece)) {
4747
throw new \Exception(sprintf('Invalid namespace %s', $namespace));
4848
}
4949
}
50-
if ( ! $this->checkPHPVarName($classname)) {
50+
if (! $this->checkPHPVarName($classname)) {
5151
throw new \Exception(sprintf('Invalid namespace %s', $namespace));
5252
}
5353

@@ -90,8 +90,9 @@ public function getPathfile()
9090

9191
public function write($force = false)
9292
{
93-
if ( ! $force && file_exists($this->getPathfile()))
93+
if (! $force && file_exists($this->getPathfile())) {
9494
throw new \Exception(sprintf('%s already exists', $this->getPathfile()));
95+
}
9596

9697
if (file_exists($this->getPathfile())) {
9798
unlink($this->getPathfile());
@@ -133,14 +134,12 @@ public function generateContent()
133134

134135
$content .= "}\n";
135136

136-
if ( ! is_dir(dirname($this->getPathfile()))) {
137+
if (! is_dir(dirname($this->getPathfile()))) {
137138
mkdir(dirname($this->getPathfile()), 0754, true);
138139
}
139140

140141
$content = str_replace(
141-
array('<license>', '<namespace>', '<classname>', '<spaces>', '<extends>')
142-
, array($this->license, $this->namespace, $this->classname, ' ', $this->extends)
143-
, $content
142+
array('<license>', '<namespace>', '<classname>', '<spaces>', '<extends>'), array($this->license, $this->namespace, $this->classname, ' ', $this->extends), $content
144143
);
145144

146145
return $content;

lib/PHPExiftool/ClassUtils/TagProviderBuilder.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function generateContent()
3939
$content .= "\n<spaces>public function __construct()\n<spaces>{\n";
4040

4141
foreach ($this->classes as $groupname => $group) {
42-
4342
$content .= "<spaces><spaces>\$this['$groupname'] = \$this->share(function(){\n";
4443
$content .= "<spaces><spaces><spaces>return array(\n";
4544

@@ -58,7 +57,6 @@ public function generateContent()
5857
$content .= "\n<spaces><spaces>return array(\n";
5958

6059
foreach ($this->classes as $groupname => $group) {
61-
6260
$content .= "<spaces><spaces><spaces>'$groupname' => \$this['$groupname'],\n";
6361
}
6462

@@ -71,14 +69,13 @@ public function generateContent()
7169
$content .= "\n<spaces><spaces>return array(\n";
7270

7371
foreach ($this->classes as $groupname => $group) {
74-
7572
$content .= "<spaces><spaces><spaces>'" . strtolower($groupname) . "' => array(\n";
7673

7774
foreach ($group as $tagname => $tagclass) {
78-
$content .= "<spaces><spaces><spaces><spaces>'" . str_replace(array('\'', '\\'),array('\\\'','\\\\'),strtolower($tagname)) . "' => array(\n";
75+
$content .= "<spaces><spaces><spaces><spaces>'" . str_replace(array('\'', '\\'), array('\\\'','\\\\'), strtolower($tagname)) . "' => array(\n";
7976
$content .= "<spaces><spaces><spaces><spaces><spaces>'namespace' => '$groupname',\n";
8077
$content .= "<spaces><spaces><spaces><spaces><spaces>'tagname' => '$tagname',\n";
81-
$content .= "<spaces><spaces><spaces><spaces><spaces>'classname' => '".str_replace('\'','\\\'',$tagclass)."',\n";
78+
$content .= "<spaces><spaces><spaces><spaces><spaces>'classname' => '".str_replace('\'', '\\\'', $tagclass)."',\n";
8279
$content .= "<spaces><spaces><spaces><spaces>),\n";
8380
}
8481

@@ -91,20 +88,18 @@ public function generateContent()
9188

9289
$content .= "\n}\n";
9390

94-
if ( ! is_dir(dirname($this->getPathfile()))) {
91+
if (! is_dir(dirname($this->getPathfile()))) {
9592
mkdir(dirname($this->getPathfile()), 0754, true);
9693
}
9794

9895
$content = str_replace(
99-
array('<license>', '<namespace>', '<classname>', '<spaces>', '<extends>')
100-
, array($this->license, $this->namespace, $this->classname, ' ', $this->extends)
101-
, $content
96+
array('<license>', '<namespace>', '<classname>', '<spaces>', '<extends>'), array($this->license, $this->namespace, $this->classname, ' ', $this->extends), $content
10297
);
10398

10499
return $content;
105100
}
106101

107-
public function setClasses(Array $classes)
102+
public function setClasses(array $classes)
108103
{
109104
$this->classes = $classes;
110105
}

lib/PHPExiftool/Driver/AbstractTag.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,4 @@ public function __toString()
189189
{
190190
return $this->getTagname();
191191
}
192-
193192
}

lib/PHPExiftool/Driver/Metadata/MetadataBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class MetadataBag extends ArrayCollection
3030
*/
3131
public function filterKeysByRegExp($regexp)
3232
{
33-
$partitions = $this->partition(function($key, $element) use ($regexp) {
33+
$partitions = $this->partition(function ($key, $element) use ($regexp) {
3434
return preg_match($regexp, $key);
3535
});
3636

lib/PHPExiftool/Driver/TagFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function getFromRDFTagname($tagname)
3535
{
3636
$classname = self::classnameFromTagname($tagname);
3737

38-
if ( ! class_exists($classname)) {
38+
if (! class_exists($classname)) {
3939
throw new TagUnknown(sprintf('Unknown tag %s', $tagname));
4040
}
4141

lib/PHPExiftool/Exception/EmptyCollectionException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
class EmptyCollectionException extends \Exception implements ExceptionInterface
1515
{
16-
1716
}

lib/PHPExiftool/Exception/ExceptionInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
interface ExceptionInterface
1515
{
16-
1716
}

lib/PHPExiftool/Exception/InvalidArgumentException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
1515
{
16-
1716
}

lib/PHPExiftool/Exception/LogicException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
class LogicException extends \LogicException implements ExceptionInterface
1515
{
16-
1716
}

lib/PHPExiftool/Exception/ParseError.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
class ParseError extends \Exception implements ExceptionInterface
1515
{
16-
1716
}

0 commit comments

Comments
 (0)