Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 9, 2017
1 parent 9e8c517 commit ce51de1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 9 additions & 8 deletions lib/Components/Component/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ public function updatePackageXml($action, $options)

switch($action) {
case 'print':
return (string) $package_xml;
return (string)$package_xml;
case 'diff':
$new = (string) $package_xml;
$new = (string)$package_xml;
$old = file_get_contents($this->getPackageXmlPath());
$renderer = new Horde_Text_Diff_Renderer_Unified();
return $renderer->render(
Expand All @@ -194,7 +194,7 @@ public function updatePackageXml($action, $options)
)
);
default:
file_put_contents($this->getPackageXmlPath(), (string) $package_xml);
file_put_contents($this->getPackageXmlPath(), (string)$package_xml);
if (!empty($options['commit'])) {
$options['commit']->add(
$this->getPackageXmlPath(), $this->_directory
Expand Down Expand Up @@ -247,7 +247,7 @@ public function timestampAndSync($options)
$package = $this->getPackageXml();
$package->timestamp();
$package->syncCurrentVersion();
file_put_contents($this->getPackageXmlPath(), (string) $package);
file_put_contents($this->getPackageXmlPath(), (string)$package);
$result = sprintf(
'Marked package.xml "%s" with current timestamp and synchronized the change log.',
$this->getPackageXmlPath()
Expand Down Expand Up @@ -308,7 +308,7 @@ public function setVersion(
if (empty($options['pretend'])) {
$package = $this->getPackageXml();
$package->setVersion($rel_version, $api_version);
file_put_contents($this->getPackageXmlPath(), (string) $package);
file_put_contents($this->getPackageXmlPath(), (string)$package);
if (!empty($options['commit'])) {
$options['commit']->add(
$this->getPackageXmlPath(), $this->_directory
Expand Down Expand Up @@ -344,7 +344,7 @@ public function setState(
if (empty($options['pretend'])) {
$package = $this->getPackageXml();
$package->setState($rel_state, $api_state);
file_put_contents($this->getPackageXmlPath(), (string) $package);
file_put_contents($this->getPackageXmlPath(), (string)$package);
if (!empty($options['commit'])) {
$options['commit']->add(
$this->getPackageXmlPath(), $this->_directory
Expand Down Expand Up @@ -384,13 +384,14 @@ public function nextVersion(
$stability_api = null,
$stability_release = null,
$options = array()
) {
)
{
if (empty($options['pretend'])) {
$package = $this->getPackageXml();
$package->addNextVersion(
$version, $initial_note, $stability_api, $stability_release
);
file_put_contents($this->getPackageXmlPath(), (string) $package);
file_put_contents($this->getPackageXmlPath(), (string)$package);
$result = sprintf(
'Added next version "%s" with the initial note "%s" to %s.',
$version,
Expand Down
1 change: 0 additions & 1 deletion lib/Components/Helper/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ private function _determineRootFromCwd()
public function traverseHierarchy($start)
{
$i = 0;
$origin = $start;
while ($start != '/' || $i < 10) {
if ($this->_isValidRoot($start) !== false) {
return $start;
Expand Down

0 comments on commit ce51de1

Please sign in to comment.