Completed
Branch master (8fc554)
by Alexander
06:05
created
src/SVNBuddy/Repository/RevisionLog/SummaryRevisionLogPlugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function parse(\SimpleXMLElement $log)
50 50
 	{
51
-		foreach ( $log->logentry as $log_entry ) {
51
+		foreach ($log->logentry as $log_entry) {
52 52
 			$revision = (int)$log_entry['revision'];
53 53
 			$author = (string)$log_entry->author;
54 54
 
55
-			if ( !isset($this->_authorRevisions[$author]) ) {
55
+			if (!isset($this->_authorRevisions[$author])) {
56 56
 				$this->_authorRevisions[$author] = array();
57 57
 			}
58 58
 
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		$summary_revisions = array();
81 81
 
82
-		foreach ( $criteria as $criterion ) {
83
-			if ( strpos($criterion, ':') === false ) {
82
+		foreach ($criteria as $criterion) {
83
+			if (strpos($criterion, ':') === false) {
84 84
 				$error_msg = 'Each criterion of "%s" plugin must be in "%s" format.';
85 85
 				throw new \InvalidArgumentException(sprintf($error_msg, $this->getName(), 'field:value'));
86 86
 			}
87 87
 
88 88
 			list ($field, $value) = explode(':', $criterion, 2);
89 89
 
90
-			if ( $field === 'author' ) {
91
-				if ( !array_key_exists($value, $this->_authorRevisions) ) {
90
+			if ($field === 'author') {
91
+				if (!array_key_exists($value, $this->_authorRevisions)) {
92 92
 					continue;
93 93
 				}
94 94
 
95
-				foreach ( $this->_authorRevisions[$value] as $revision ) {
95
+				foreach ($this->_authorRevisions[$value] as $revision) {
96 96
 					$summary_revisions[$revision] = true;
97 97
 				}
98 98
 			}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function getRevisionData($revision)
120 120
 	{
121
-		if ( !isset($this->_revisionSummary[$revision]) ) {
121
+		if (!isset($this->_revisionSummary[$revision])) {
122 122
 			$error_msg = 'Revision "%s" not found by "%s" plugin.';
123 123
 			throw new \InvalidArgumentException(sprintf($error_msg, $revision, $this->getName()));
124 124
 		}
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 */
170 170
 	public function getLastRevision()
171 171
 	{
172
-		if ( !$this->_revisionSummary ) {
172
+		if (!$this->_revisionSummary) {
173 173
 			return null;
174 174
 		}
175 175
 
Please login to merge, or discard this patch.