Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 19, 2024
1 parent 214ad5a commit 227aaa3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/Annotator/ClassAnnotatorTask/FormClassAnnotatorTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public function shouldRun(string $path, string $content): bool {
*/
public function annotate(string $path): bool {
preg_match('#\buse (\w+)\\\\Form\\\\(.+)Form\b#', $this->content, $matches);
if (empty($matches[1]) || empty($matches[2])) {
return false;
}

$appNamespace = $matches[1];
$name = $matches[2] . 'Form';

Expand Down
10 changes: 5 additions & 5 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Database\Type;
use Cake\Database\TypeFactory;
use Cake\Datasource\ConnectionManager;
use Controllers\Plugin as ControllersPlugin;
use IdeHelper\Plugin as IdeHelperPlugin;
Expand Down Expand Up @@ -73,10 +73,10 @@

Cache::setConfig($cache);

Type::build('time');
Type::build('date');
Type::build('datetime');
Type::build('timestamp');
TypeFactory::build('time');
TypeFactory::build('date');
TypeFactory::build('datetime');
TypeFactory::build('timestamp');

class_alias(Controller::class, 'App\Controller\AppController');

Expand Down

0 comments on commit 227aaa3

Please sign in to comment.