<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115299/">https://git.reviewboard.kde.org/r/115299/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/115299/diff/1/?file=240450#file240450line372" style="color: black; font-weight: bold; text-decoration: underline;">duchain/builders/declarationbuilder.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void DeclarationBuilder::visitClassStatement(ClassStatementAst *node)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">372</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">const</span> <span class="n">KDevPG</span><span class="o">::</span><span class="n">ListNode</span><span class="o"><</span> <span class="n">NamespacedIdentifierAst</span><span class="o">*</span> <span class="o">>*</span> <span class="n">it</span> <span class="o">=</span> <span class="n">node</span><span class="o">-></span><span class="n">traitsSequence</span><span class="o">-></span><span class="n">front</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'd push this huge block into a separate function for readability</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/115299/diff/1/?file=240450#file240450line668" style="color: black; font-weight: bold; text-decoration: underline;">duchain/builders/declarationbuilder.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">668</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">DUChainWriteLocker</span> <span class="n">lock</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this is hazardous as it will be kept while visiting the base class (see below) - scope this lock</pre>
</div>
<br />
<p>- Milian Wolff</p>
<br />
<p>On January 24th, 2014, 3:38 p.m. UTC, Heinz Wiesinger wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Heinz Wiesinger.</div>
<p style="color: grey;"><i>Updated Jan. 24, 2014, 3:38 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=305779">305779</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-php
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Add support for trait uses, as introduced in PHP 5.4.
This can be syntax as simple as
class A {
use B;
}
or as complicated as
class A {
use B,C,D {
B::one insteadof C,D;
C::two as foo;
D::three as protected bar;
}
}
allowing changing both function name and visibility. Additionally this syntax allows manual conflict resolution.
The error messages I used are as close as possible to the actual errors given by PHP. We check for
- invalid function modifiers (static, final)
- property name conflicts between traits and main class
- method name conflicts between multiple traits</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Unit tests, parsing local test files</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>parser/phplexer.cpp <span style="color: grey">(3a0a57dac6e7ebbe3e2c7d59912dc289bc25f71f)</span></li>
<li>parser/php.g <span style="color: grey">(df0b5db7766417fe133a30678e2151302c3ddbfa)</span></li>
<li>duchain/tests/uses.cpp <span style="color: grey">(8ae049c1a5a96db9ed03eeed24a01e86dbb88ac3)</span></li>
<li>duchain/tests/uses.h <span style="color: grey">(b97f15b8bfed391b236e92aee3a4efa9d589d451)</span></li>
<li>duchain/tests/expressionparser.cpp <span style="color: grey">(67829fec66dd9445ecfb9598028e7da630e2889c)</span></li>
<li>duchain/tests/expressionparser.h <span style="color: grey">(0e59aab68c2d8a9c9b8cee84d237f921c29a5c9f)</span></li>
<li>duchain/navigation/declarationnavigationcontext.cpp <span style="color: grey">(08d01425a0a94b3a65774141476783f9ce3a304c)</span></li>
<li>duchain/navigation/declarationnavigationcontext.h <span style="color: grey">(5ea31346522b2f24f1864b2876da6a3b9ddecba8)</span></li>
<li>duchain/builders/usebuilder.cpp <span style="color: grey">(32c2490efe19958d9d9b4ae93796fc6e2fdaf42c)</span></li>
<li>duchain/builders/usebuilder.h <span style="color: grey">(af10294ea72d6b9ac156e7ca31745d17a5c4c1db)</span></li>
<li>duchain/builders/declarationbuilder.cpp <span style="color: grey">(2f4d8554b641ccbe15a375355b723c300172254c)</span></li>
<li>duchain/builders/declarationbuilder.h <span style="color: grey">(826bbb5d87cc3408c326cdf34191405907a6e1bf)</span></li>
<li>completion/context.cpp <span style="color: grey">(423a0de87ab8cae0986270b296640afd48b21628)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115299/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>