| @@ -93,11 +93,11 @@ | ||
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | 95 | * Merge new user favorites to a type. |
| 96 | 96 | * |
| 97 | - * @param string $type | |
| 98 | - * @param array|string $favorites | |
| 99 | - * @param bool $store | |
| 97 | + * @param string $type | |
| 98 | + * @param array|string $favorites | |
| 99 | + * @param bool $store | |
| 100 | 100 | * |
| 101 | 101 | * @return array|bool |
| 102 | 102 | */ |
| 103 | 103 | public function merge( $type, $favorites, $store = true ) { |
| @@ -106,11 +106,11 @@ | ||
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | 108 | * Delete existing favorites from a type. |
| 109 | 109 | * |
| 110 | - * @param string $type | |
| 111 | - * @param array|string $favorites | |
| 112 | - * @param bool $store | |
| 110 | + * @param string $type | |
| 111 | + * @param array|string $favorites | |
| 112 | + * @param bool $store | |
| 113 | 113 | * |
| 114 | 114 | * @return array|int |
| 115 | 115 | */ |
| 116 | 116 | public function delete( $type, $favorites, $store = true ) { |
| @@ -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 | } |