mediact / coding-standard Goto Github PK
View Code? Open in Web Editor NEWStandardized PHP code styling tools.
License: MIT License
Standardized PHP code styling tools.
License: MIT License
As a developer I'd like to have the requirement for phpdoc for methods/variables in classes removed, so I don't have to add irrelevant doc blocks to my code.
Now that with the latest PHP versions it's possible to set return types and parameter types within the code, having them in the phpdoc as well is redundant and only adds noise. They should only be added if there is not just one type for these variables/methods or when more information is required in the phpdoc about the variable or method..
In the following situation, the doc blocks add nothing useful:
class Foobar extends BaseFoobar
{
private FoobarVariable $foobarVariable;
public function __construct(FoobarVariable $foobarVariable)
{
$this->foobarVariable = $foobarVariable;
}
public function someFunction(string $key, array $values): void
{
$foobarVariable = $this->foobarVariable;
// PHP magic is done here
}
}
By default, parameters in PHP storm are created like:
/** @var Warehouse */
private $warehouse;
/** @var PredictedStock */
private $predictedStock;
Although it is not really nice to read, testing-suite is ok with this
We want to enforce an empty line between parameters, like
/** @var Warehouse */
private $warehouse;
/** @var PredictedStock */
private $predictedStock;
Requirements
Nice to have
When I try to install a package that requires mediact/coding-standard ^3.2
๎ฐ composer require elgentos/laravel-coding-standard --dev
Using version ^1.0 for elgentos/laravel-coding-standard
./composer.json has been updated
Running composer update elgentos/laravel-coding-standard
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mediact/coding-standard[3.0.0, ..., 3.0.2] require php ^5.4.0 || ^7.0 -> your php version (8.1.3) does not satisfy that requirement.
- mediact/coding-standard[3.1.0, ..., 3.2.0] require php ^7.0 -> your php version (8.1.3) does not satisfy that requirement.
- elgentos/laravel-coding-standard 1.0.0 requires mediact/coding-standard ^3.0 -> satisfiable by mediact/coding-standard[3.0.0, ..., 3.2.0].
- Root composer.json requires elgentos/laravel-coding-standard ^1.0 -> satisfiable by elgentos/laravel-coding-standard[1.0.0].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require elgentos/laravel-coding-standard:*" to figure out if any version is installable, or "composer require elgentos/laravel-coding-standard:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.