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

Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit c96ebb3

Browse files
committed
Merge branch 'cs/remove-underscores' of https://github.com/arse/zf2 into feature/protected-underscores
Conflicts: library/Zend/Console/Getopt.php

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/File/Decrypt.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Decrypt extends Filter\Decrypt
2626
*
2727
* @var string
2828
*/
29-
protected $_filename;
29+
protected $filename;
3030

3131
/**
3232
* Returns the new filename where the content will be stored
@@ -35,7 +35,7 @@ class Decrypt extends Filter\Decrypt
3535
*/
3636
public function getFilename()
3737
{
38-
return $this->_filename;
38+
return $this->filename;
3939
}
4040

4141
/**
@@ -46,7 +46,7 @@ public function getFilename()
4646
*/
4747
public function setFilename($filename = null)
4848
{
49-
$this->_filename = $filename;
49+
$this->filename = $filename;
5050
return $this;
5151
}
5252

@@ -66,12 +66,12 @@ public function filter($value)
6666
throw new Exception\InvalidArgumentException("File '$value' not found");
6767
}
6868

69-
if (!isset($this->_filename)) {
70-
$this->_filename = $value;
69+
if (!isset($this->filename)) {
70+
$this->filename = $value;
7171
}
7272

73-
if (file_exists($this->_filename) and !is_writable($this->_filename)) {
74-
throw new Exception\RuntimeException("File '{$this->_filename}' is not writable");
73+
if (file_exists($this->filename) and !is_writable($this->filename)) {
74+
throw new Exception\RuntimeException("File '{$this->filename}' is not writable");
7575
}
7676

7777
$content = file_get_contents($value);
@@ -80,12 +80,12 @@ public function filter($value)
8080
}
8181

8282
$decrypted = parent::filter($content);
83-
$result = file_put_contents($this->_filename, $decrypted);
83+
$result = file_put_contents($this->filename, $decrypted);
8484

8585
if (!$result) {
86-
throw new Exception\RuntimeException("Problem while writing file '{$this->_filename}'");
86+
throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'");
8787
}
8888

89-
return $this->_filename;
89+
return $this->filename;
9090
}
9191
}

src/File/Encrypt.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Encrypt extends Filter\Encrypt
2626
*
2727
* @var string
2828
*/
29-
protected $_filename;
29+
protected $filename;
3030

3131
/**
3232
* Returns the new filename where the content will be stored
@@ -35,7 +35,7 @@ class Encrypt extends Filter\Encrypt
3535
*/
3636
public function getFilename()
3737
{
38-
return $this->_filename;
38+
return $this->filename;
3939
}
4040

4141
/**
@@ -46,7 +46,7 @@ public function getFilename()
4646
*/
4747
public function setFilename($filename = null)
4848
{
49-
$this->_filename = $filename;
49+
$this->filename = $filename;
5050
return $this;
5151
}
5252

@@ -66,12 +66,12 @@ public function filter($value)
6666
throw new Exception\InvalidArgumentException("File '$value' not found");
6767
}
6868

69-
if (!isset($this->_filename)) {
70-
$this->_filename = $value;
69+
if (!isset($this->filename)) {
70+
$this->filename = $value;
7171
}
7272

73-
if (file_exists($this->_filename) and !is_writable($this->_filename)) {
74-
throw new Exception\RuntimeException("File '{$this->_filename}' is not writable");
73+
if (file_exists($this->filename) and !is_writable($this->filename)) {
74+
throw new Exception\RuntimeException("File '{$this->filename}' is not writable");
7575
}
7676

7777
$content = file_get_contents($value);
@@ -80,12 +80,12 @@ public function filter($value)
8080
}
8181

8282
$encrypted = parent::filter($content);
83-
$result = file_put_contents($this->_filename, $encrypted);
83+
$result = file_put_contents($this->filename, $encrypted);
8484

8585
if (!$result) {
86-
throw new Exception\RuntimeException("Problem while writing file '{$this->_filename}'");
86+
throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'");
8787
}
8888

89-
return $this->_filename;
89+
return $this->filename;
9090
}
9191
}

0 commit comments

Comments
 (0)