Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114329 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57302 invoked from network); 10 May 2021 08:52:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 May 2021 08:52:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BB7FB1804C8 for ; Mon, 10 May 2021 02:00:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mx.kolabnow.com (mx.kolabnow.com [95.128.36.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 10 May 2021 02:00:04 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id EF590A09 for ; Mon, 10 May 2021 11:00:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received:received:received; s= dkim20160331; t=1620637201; x=1622451602; bh=loFXovP6wvsWkK3avoH RA7UDZZBM7G6NAsD64RA57a8=; b=W7HsH5/hnLj1fBQLQNbXhM01Q5heLGssKa4 cLgsqs6lhDejpfmptYi7kskFDpvaDzMA5hGq1ckr74jLL9WJP0/GdblA+JhHAjYn IJjYubqCqRD8+mJcDJGa3k6tWSdmwctA1JuuMJpnZfc7FZNTbDBbPfiJt8vGyHVg 2hDZD3DcjbONJxtvJnwCWH6S/vujO9SIkF7/rwOL4OArnKZRV+dD4g/StqQxdUmh bQYj7tWUS8+wYkMgHb9EU1BOcyQm1G48fSXZy5GqTRlVipuSoHlHC+HbmDpi9duL odtdytyAIspeAx2+h28SEIg/5cQAmfsY0GdLZ/PBMxrNCnZa8sobdKGKxDMubenE GALEMsnnxvRwvtd8g7ny4NCykXvPR4R2fm/OdowSBAk7MTaeIdj1tMcxWV7Ss60K 4wWHRb04BZFDf7lduHvoc+bYR+kqyzTNg7p68KPQvhG/uC0JzPMkWZCKQFufsZWa VBboFUn3nlcqelYZXN1TvbYLg0LMPPMQu4cINFH/LRAq7kP1JjyoEjH71JzTLqlU YB7Nq312n2/GALV99Ge838WNdEbKcvMFkbkzISDHbqz9oxjRtmfWOcxrgMmWQbjv mkoDowdHNys+V363MxpG8ysq2s9hSUBgnJlJgubcDD1TwxUX0JD3QibA7WvsNAGN nox7iTZM= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gPQ7GqDj3WDC for ; Mon, 10 May 2021 11:00:01 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id C89BA85C for ; Mon, 10 May 2021 11:00:01 +0200 (CEST) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 4EC00AC96 for ; Mon, 10 May 2021 11:00:00 +0200 (CEST) To: internals@lists.php.net References: <1620635361.9147.0@gmail.com> Message-ID: <5c1cffb1-6834-e27a-93c9-6b9fc1c44aa9@alec.pl> Date: Mon, 10 May 2021 10:59:57 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC][Draft] Body-less __construct From: alec@alec.pl (Aleksander Machniak) On 10.05.2021 10:49, Matīss Treinis wrote: > Another point to be made here, as far as my interpretation of PSR-12, the > curly braces occupy two lines for methods with multiline arguments. So for > whoever follows PSR-12, it's more like this, with brackets just dangling > there across 2 lines. > > [...] > class Foo { > public function __construct( > private Bar $bar, > private Baz $baz > ) { > } > } or some would prefer: class Foo { public function __construct( private Bar $bar, private Baz $baz ) { // empty } } The question to the proposal. Will this new syntax apply to: 1. all methods 2. all constructors 3. only to constructors with property promotion? I think 3 makes most sense here and is less contentious. So, just be sure to specify this in the RFC. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com