Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Docheader Laravel Package

malukenho/docheader

Laravel package that adds and manages standardized documentation headers in your source files. Generate consistent file/class docblocks with project metadata, author, license, and timestamps, helping teams enforce style and keep headers up to date automatically.

View on GitHub
Deep Wiki
Context7

DocHeader

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

How much time we have wasted to change copyright years in our project? How much times we forget to update it and then we're in the middle of a new year using last year copyright dated? That's sucks!!one!!

Put doc header check in your build and get it out of your way!

Installing

 composer require --dev --sort-packages malukenho/docheader

Setting up

Put your header in one .docheader file in the directory that you're running the checker/fixer. It file must contain only the dockblock as you want, like following example:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

and then run the checker:

./vendor/bin/docheader check src/

So, you get errors or a message saying that everything is ok!

Docheader file

By default, the docheader search for a .docheader file on the current directory that the command is executed. But you can specify a folder or a file to be used as placeholder using the option --docheader [file-or-path]

Current year placeholder

You can also put %year% on your .docheader file to refer to the current Year, like that:

/**
 * @copyright Copyright (c) 2005-%year% Zend Technologies USA Inc. (http://www.zend.com)
 */

Regexp assertion

If you're using >=0.1.5 version, you can use the %regexp:% placeholder to match some content.

Example:

/**
 * @copyright Copyright (c) 20%regexp:\d{2}%-2016 Zend Technologies USA Inc. (http://www.zend.com)
 */

In this case %regexp:\d{2}% assert that it should be a number of two digits between 20 and -.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport