• Introduction
    • Security and Updates
    • Introduction
    • Final Thoughts
    • Introduction
    • Single Responsibility Principle
    • Open Closed Principle (OCP)
    • Liskov Substitution Principle
    • Interface Segregation Principle
    • Dependency Inversion Principle
    • Final Thoughts
    • Introduction
    • Variables
    • Comparison
    • Functions
    • Objects and Data Structures
    • Classes
    • Tests
    • SOLID
    • DRY principle
    • Imports
    • Final Thoughts
    • Strategy
    • Facades
    • Eloquent Models
    • Elequent Factories
    • Artisan Commands
    • Controllers
    • Requests & Responses
    • Routing
    • Authorization
    • Middleware
    • Validation
    • Views
    • Translations
    • Exceptions
    • Jobs
    • Events
    • Configs
    • Migrations
    • Security
    • Files & Disks
    • Tests
    • Services
    • Final Thoughts
    • Naming
    • TL;DR
    • Final by default
    • Strict types
    • Typed Properties
    • Void return types
    • Doc Blocks
    • Generic types and templates
    • Strings
    • Comments
    • Classes
    • Type-casting
    • Named constructors
    • Domain-specific operations
    • assert() vs throw
    • Regex
    • Final Thought
    • Introduction
    • Routing
    • Controllers
    • Authentication
    • Versioning
    • Introduction
    • Indices
    • Introduction
    • Gitflow
    • Final Thoughts
    • Resources

Void return types

If a method return nothing, it SHOULD be indicated with void. This makes it more clear to the users of your code what your intention was when writing it.

Edit this page on GitHub
PhpTyped Properties
PhpDoc Blocks

Powered by Docus