| @@ -54,10 +54,10 @@ | ||
| 54 | 54 | * @access public |
| 55 | 55 | * @param string $conflict A conflict class name. |
| 56 | 56 | */ |
| 57 | 57 | public function watch( $conflict ) { |
| 58 | - if ( is_subclass_of( new $conflict, 'Optml_Abstract_Conflict' ) ) { | |
| 59 | - array_push( $this->watched_conflicts, new $conflict ); | |
| 58 | + if ( is_subclass_of( new $conflict(), 'Optml_Abstract_Conflict' ) ) { | |
| 59 | + array_push( $this->watched_conflicts, new $conflict() ); | |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| @@ -140,9 +140,9 @@ | ||
| 140 | 140 | * @access public |
| 141 | 141 | * @return int |
| 142 | 142 | */ |
| 143 | 143 | public function get_conflict_count() { |
| 144 | - if ( empty( $this->watched_conflicts ) || sizeof( $this->watched_conflicts ) === 0 ) { | |
| 144 | + if ( empty( $this->watched_conflicts ) ) { | |
| 145 | 145 | return 0; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | $count = 0; |
| @@ -152,9 +152,9 @@ | ||
| 152 | 152 | * @var Optml_Abstract_Conflict $conflict |
| 153 | 153 | */ |
| 154 | 154 | foreach ( $this->watched_conflicts as $conflict ) { |
| 155 | 155 | if ( $conflict->is_active( $this->dismissed_conflicts ) ) { |
| 156 | - $count++; | |
| 156 | + ++$count; | |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | return $count; |
| 160 | 160 | } |