تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

In this video, you'll learn how to introduce seams. This is one of my favorite refactoring techniques - particularly when cleaning up large, messy methods. It's a simple enough process that involves adding a conditional to the top of the method you're refactoring. This then gives you a "hook" for introducing and rewriting portions of the code, while still having the option to fall back to the original logic and implementation.

With this approach, you can incrementally refactor your code in bits and pieces.

Introduce SeamsRefactor Long Methods

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟