| @@ -166,12 +166,12 @@ | ||
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | 168 | * Register a new type class. |
| 169 | 169 | * |
| 170 | - * @param string $class_name | |
| 170 | + * @param string $class | |
| 171 | 171 | */ |
| 172 | - public function register( $class_name ) { | |
| 173 | - $type_instance = new $class_name(); | |
| 172 | + public function register( $class ) { | |
| 173 | + $type_instance = new $class(); | |
| 174 | 174 | |
| 175 | 175 | $this->types[ $type_instance->get_name() ] = $type_instance; |
| 176 | 176 | } |
| 177 | 177 | |
| @@ -237,11 +237,12 @@ | ||
| 237 | 237 | /** |
| 238 | 238 | * Throw action doesn't exist exception. |
| 239 | 239 | * |
| 240 | 240 | * @param string $action |
| 241 | - * | |
| 242 | - * @throws \InvalidArgumentException If favorite action fails or validation errors occur. | |
| 243 | 241 | */ |
| 244 | 242 | public function action_doesnt_exists( $action ) { |
| 245 | - throw new \InvalidArgumentException( sprintf( "Action '%s' to apply on favorites doesn't exists", esc_html( $action ) ) ); | |
| 243 | + throw new \InvalidArgumentException( sprintf( esc_html( | |
| 244 | + "Action '%s' to apply on favorites doesn't exists", | |
| 245 | + $action | |
| 246 | + )) ); | |
| 246 | 247 | } |
| 247 | 248 | } |